Skip to content
Blog

Why we keep live WordPress code read only

Why we keep live WordPress code read only: fewer surprises, a rollback that always works, and a smaller target for attackers.

The WP Waterfall team · Workflow

This is a short essay on one habit that shapes how WP Waterfall works: we keep live WordPress code read only. By the end you will know what that means for your day, what it rules out, and why we think the trade is worth it.

What "read only" means on a live site

On a live site in Git mode, the code is a release: a finished set of files that nothing edits in place. wp-admin shows no Install or Update buttons for plugins, themes, or WordPress itself, the file editors are off, and SFTP cannot reach it. A plugin that tries to write its own files on live cannot. Your content is not affected. Posts, comments, orders, and uploads change all day, as they should.

Code reaches live one way: a deploy from staging. Staging is a private copy of the site where you install, update, and try things. When staging is right, you deploy, and live switches to the new release. Live keeps its last ten releases, so going back is one click.

Code moves from staging to live as a release, and live itself stays read only.

Why we keep live WordPress code read only

Three reasons, in the order we felt them.

Fewer surprises. Most outages on a WordPress site start with a change nobody planned to test: an update pressed on live at 5 pm, or a file edited over SFTP to fix one thing and break another. When live cannot change in place, every change has to pass through staging first. That sounds slow, and it is slower by about a minute. It is also the minute in which you notice the white screen on staging instead of on live.

A rollback that always works. When files can change in place, nobody knows what live really runs. A rollback to "last Tuesday" means guessing. When live runs a release, a rollback is a switch to the release before it, and nothing else moves. Rollback changes code only, and the database and uploads stay as they are.

Live keeps its last ten releases, and a rollback switches back to one of them.

A smaller target. A lot of WordPress malware works by writing a file: a backdoor in uploads, or a line added to a plugin. Code that cannot be written is code that cannot be infected that way. We still scan every live site for malware every 6 hours, and Patchstack blocks attacks on known plugin holes, because uploads stay writable and no single defense is enough. Read only code removes the most common path.

What it rules out, and what it does not

It rules out quick fixes on live. If a plugin needs a file written on live, it will not work, and we would rather say that plainly than pretend. Our help center lists plugins that write files and what to do instead.

It does not rule out wp-admin. Activating and deactivating plugins still works on live, because that changes the database, not the files. Uploads work. Caches work. The must-use plugin that WP Waterfall runs on every site lives outside your code, so it updates on its own without touching your release.

It does not rule out a writable staging. Staging has a switch, SFTP or Git. Switch to SFTP mode and wp-admin installs plugins again, you edit over SFTP, and you commit when you are done. The code moves to live as a release either way.

The habit underneath

The habit is simple: change the copy, look, then ship. Every tool on the platform assumes it. Automatic updates run on staging and hold back an update that fails a check. The local development add-on pulls from live and pushes only to staging. An AI agent connected through our MCP server cannot install a plugin on live either, because the rule is in the API, not in the dashboard. The developer side of this is on the developer tools page.

What to do next

Open your staging environment and make your next change there. Then deploy, and notice how little you had to think about live.

Read next

Try what you just read about.

See it in your own dashboard.