Menu

The deploy pattern that keeps my 1,000-page site alive without shell access
📰

The deploy pattern that keeps my 1,000-page site alive without shell access

DEV Community: php·Bryan Hamilton·10 days ago
#iFcAmXy0
#devto#dev#deploy#file#guarded
Reading 0:00
15s threshold

I run The DJ Calendar ( https://thedjcalendar.com ) — about 1,000 pages of PHP/MySQL on shared cPanel hosting. No shell. No SSH. No deploy pipeline. LiteSpeed caches HTML for 5 minutes, and opcache serves stale output for a minute after every write.

Pasting a code change into a production file through a browser file manager is how sites die. So over months of live deploys, I built a worker pattern that makes that kind of deploy survivable. I just open-sourced it: guarded-deploy-workers ( https://github.com/bryanhamiltondev/guarded-deploy-workers ).

How a deploy works

A "worker" is a single PHP file I upload to the web root. I hit its URL once with a secret token.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.