Tutorial · migration-hosting · Published 2026-08-15 · 3 min read

Going from staging to live cleanly

Staging to live launch: promote files and database, fix theme and plugin config, test URLs and caches and release in order.

Staging to live is a copy, not a cutover

Staging lets you edit and test without the live site noticing. Moving to live is not "just upload": the staging database stores the live domain in its options, the URLs in its content, and the same value in its canonical headers. Going live in the wrong order is how sites come up with every link pointing at the staging domain, or worse with the staging site publicly indexed.

Step 1: get the list of what changes

  1. Files: upload or rsync from staging to the live document root.
  2. Database: restore the staging DB over the live DB (or export/import), whichever the setup allows; on shared hosting this is usually an import.
  3. Configuration: .env, wp-config.php or CMS config must point at the live database and the live-only settings (cache, debug, email).
  4. Uploads and generated media: copy the media folder to its live location.

Step 2: the staging -> live URL conversion

The live DB contains URLs from staging (https://staging.example.com/). Before anyone visits:

  1. Run the database search-replace from staging URL to live URL (the WordPress tooling or the WP-CLI search-replace; both are covered in the restore order article).
  2. Include schemes: https and http variants, and the www version, whatever you standardized in www vs non-www.
  3. Never run find-replace across serialized data by hand; the WP-CLI --precise guard is the safe form.

Step 3: the mixed items

Staging leaks through three things the DB swap does not catch:

LeakWhere it hidesFix
Hardcoded URLstemplates, redirects, emailsgrep for the staging domain across the file set
Staging proxying/anti-bota staging-only basic-auth or firewalled accessremove before the DNS cutover
The wrong home and siteurlin the options tablepart of the search-replace, line one

Step 4: launch in the right order

  1. Push files and DB.
  2. Point the live domain's DNS or the hosting setup at the new copy (if the staging was a subfolder, this is just a document-root change).
  3. Disable staging-only layers (maintenance, proxy, dev mode).
  4. Test the live URL hard: home, an internal page, the login, https, and one deep URL with the URL inspection tool once Search Console is attached.

Step 5: the launch list

Before telling anyone:

The purpose-built sibling pages are useful together: replicate to a new host when the destination is a new host, and the host migration checklist when the whole environment moves.

Need a website built, fixed, optimised, migrated or replaced?

This technical resource is written by CSMBAC, a small design and development studio. If you would rather hand the problem to a professional, the website service page explains how we build enquiry-ready websites.

Explore website services