How should a small team run a staging site without losing live content?
· 5 min read
Keep live as the source of truth for content and staging as the source of truth for code, move each one way only, and release from version control with a backup.
In brief
Small web teams often struggle to keep a staging site in step with a live site, especially when a client keeps adding content on live while new work is being built on staging. The simplest fix is a clear rule about direction. The live site is the single source of truth for content, and the staging site is the source of truth for code. Content moves down from live to staging when a piece of work starts, and code, themes and configuration move up from staging to live as a planned release. That way nobody ever has to merge two databases. In practice that means refreshing staging from live at the start of each job, rewriting the site address with a tool that understands stored settings, keeping code in version control and releasing from there, and moving any client drafts across item by item rather than overwriting the live database. Take and test a backup before every release, and decide in advance whether you would roll back or fix forward if something goes wrong, because once real customers have used the live site a full rollback can lose their data. Keep staging behind a password and out of search engines. The article draws on John Sansbury's The Journey to Service Excellence on release and deployment management, and gives a short worked example and the common mistakes to avoid.
Treat the live site as the single source of truth for content and the staging site as the source of truth for code, and only ever move each in one direction. Content flows down from live to staging when work starts, and code, themes and configuration flow up from staging to live as a planned release, so you never have to merge two databases.
That one rule removes most of the pain of a client adding pages on live while changes are built on staging.
Why the two way sync keeps failing
A website is really two things travelling together: the code that makes it work and the content people add every day. They change at different speeds and are owned by different people. The developer owns the code. The client owns the content. When a team tries to sync whole databases in both directions, it is asking one copy to be right about both at once, and on a busy site that is rarely true for more than an afternoon.
John Sansbury makes a useful point about the word deployment in The Journey to Service Excellence: "Although it is conventionally used to refer to moving something to a live environment, it actually refers to moving from one environment to another." Seen that way, refreshing staging from live is a deployment too, and it deserves the same small amount of care.
Practical steps
- Write down the direction of travel. A short note for each site saying "content: live to staging, code: staging to live" settles most arguments before they start.
- Refresh staging from live at the start of each piece of work, not at the end. Copy the live database and media down, then rewrite the site address so staging points at itself. On WordPress, the WP-CLI search-replace command is built for this, and its project documentation says it handles PHP serialised data, which a plain find and replace on a database dump can break. Run it as a dry run first.
- Keep code in version control and release from there. Push themes, plugins and configuration to live from the repository, never by copying files from one server to another. John describes the principle behind this as a release that "is always taken from this source (as opposed to taking a copy of a copy)."
- Agree a short content pause for big releases. If a change touches page structure or custom fields, ask the client to hold edits for an hour or two while you deploy. For routine theme or plugin changes, no pause is needed because you are not touching their content.
- Move client drafts item by item. If the client has prepared new pages on staging, export or recreate just those pages on live. Do not push the staging database over the top of live to save time.
- Take a backup of live immediately before each release and check you can restore it. Then decide in advance what you will do if the release goes wrong. John notes that what used to be called a back out plan is now a remediation plan, because "it is not always possible to back out of a change; sometimes it is necessary to move forwards." Once real customers have submitted forms or orders on live, rolling the whole database back may lose them, so a fix forward is often the safer choice.
- Protect staging properly. Keep basic authentication or an IP allow list on it, and stop search engines indexing it, so that test content never competes with the real site.
A short worked example
A small agency looks after a dozen brochure sites for local businesses. One client wants a new services section built while their office manager carries on adding news posts on the live site. On Monday the developer refreshes staging from live, builds the new section and its templates, and shows the client on the protected staging address. On Thursday the client approves. The developer takes a backup of live, deploys the theme and plugin changes from the repository, and then creates the four new service pages directly on live using the approved copy. The news posts added that week are untouched, because the live database was never overwritten.
Common mistakes
- Pushing the staging database to live, which quietly deletes everything added on live since the last refresh.
- Letting the client edit content in both places, so there are two versions of the truth.
- Running a plain text find and replace on the database, which can corrupt stored settings.
- Skipping the backup because the change "is only a plugin update".
- Leaving staging open to search engines and the public.
Keeping it proportionate
None of this needs heavy process. For a handful of small sites, a repository, a backup and a clear rule about which way content and code travel is enough. The aim is the balance John describes for any release policy: enough stability that the client trusts the live site, and enough flexibility that changes still ship quickly.
For the wider good practice on change and release, see PeopleCert's ITIL guidance and the service management standard ISO/IEC 20000.
If this helped, John Sansbury's The Journey to Service Excellence covers release and deployment management, release policy and remediation planning in depth, and is available to Exchange members.
Tags: esm-questions, release-management, deployment, staging, change-enablement
Sources
Join the Exchange free
Join free to unlock the complete knowledge library.
Founder membership is free for life
More from Esm
How do I upgrade my ITIL 4 certification to ITIL 5?
4 min read
AI usage limits at work: expected to use AI, then rationed
5 min read
Audience rules for individual articles
1 min read
Bring legacy articles across carefully
1 min read
Setting the audience for a whole knowledge base
1 min read
Managers got time back from AI, then spent it checking everyone else's work
5 min read
Related articles
How do I upgrade my ITIL 4 certification to ITIL 5?
How to move from ITIL 4 to ITIL (Version 5) without starting again: which single module upgrades each ITIL 4 designation, what the Bridge is for, and the 2027 dates to plan around.

AI usage limits at work: expected to use AI, then rationed
Workday research finds half of AI users hit usage limits last month, and the people with AI written into their performance expectations ran out most often. What leaders can do about the mixed message.
Audience rules for individual articles
Most articles should follow the audience rules of the knowledge base they live in. When an article deserves a rule of its own, and how to keep those rules few and explained.
Bring legacy articles across carefully
Moving to a new knowledge base? Bring the old articles across carefully, or bring the old problems with them. How to sort what to keep, fix and leave behind.
Setting the audience for a whole knowledge base
Most audience decisions in knowledge are made once, for a whole knowledge base, and then forgotten. Why that one setting deserves a deliberate answer and a regular check.

Managers got time back from AI, then spent it checking everyone else's work
New UK research from monday.com says AI cut managers' routine admin, but many now spend more time reviewing output, and 45% use AI to draft performance reviews.
