Dev.to WebDev 🛠 Dev 👁 0 📖 1 min read

How do you verify a deploy when you have no shell access?

Genuine question, because I have a weird constraint and I'm curious how everyone else handles it. I run two PHP sites on shared cPanel hosting. No SSH, no shell, no CI runner, nothing touches the server except the cPane

Genuine question, because I have a weird constraint and I'm curious how everyone else handles it.

I run two PHP sites on shared cPanel hosting. No SSH, no shell, no CI runner, nothing touches the server except the cPanel file manager and FTP. For years my deploys were: edit file, upload, refresh the page, squint, hope.

That got old fast, so I built something I call self-verifying worker files. A deploy is now a single PHP file I upload through cPanel and hit in a browser. It does everything itself:

  1. Token gate in the URL, so nobody else can trigger it
  2. Needle matching - the patch only applies if an exact marker string exists in the source, and only once
  3. A lint check (php -l equivalent) on the patched result before it commits, with automatic rollback if it breaks
  4. Self-cleaning backups so a rollback is one rename away
  5. A dry-run mode that reports every needle match count BEFORE touching anything, so I can see nine "count: 1" results and know the patch will land clean

Then I verify the live page with a cache-buster query string, grep the served HTML for the patch marker, and only then call it shipped.

It works. It has saved me more times than I can count. But it is all me, in a browser, clicking.

Am I overengineering this because I lack shell access? What do you do when there's no terminal - do you trust your host's staging tools, push from git somewhere else, or have you built your own weird machinery too? War stories welcome, especially the ones that ended badly.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.