TOPIC · 02 · UPDATED 2026-10allwpcare.com/topics/move-a-wordpress-site/
Topics / move-a-wordpress-site

Move a WordPress Site

Order of steps to move WordPress to a new host or from staging to live, and the page that fixes each error that follows: database, redirects, 404.

Moving the whole site: back up, copy the files and the database, fix wp-config.php, change the address, save permalinks. Moving only settings from staging to live: do not push the database. Use the guides in the first section below.

A whole-site move goes wrong in a few known places: the database details, the table prefix, the site address, the HTTPS settings, the saved permalinks and the PHP version. Do the steps in order, change the address on purpose, and keep the old site until the new one has passed the checks. For a page that does not match any of this, start at Fix a broken WordPress site.

Six steps in order: back up both sites, copy the site, fix wp-config.php, change the address, save permalinks and log in, then match any failure to its error page.
The order of a move. Steps 3 and 4 explain five of the six errors in the first group below.

Which kind of move is yours?#

You want toStart with
Put staging changes on live (copy only the settings you changed)Move settings from staging to live
Carry settings to another site (as a file)Export and import settings
Change host or domain (copy files and database)The checklist below

A database push from staging replaces posts, comments and orders made on live since the copy. That is why the first row copies settings and not the database.

A checklist for a whole-site move#

  1. Make a backup of the old site, and of the new site if it already has content.
  2. Copy the files and the database to the new host.
  3. Open wp-config.php on the new host. Set the database name, user, password and host the new server gave you. Keep the $table_prefix the copied tables really use. You type these by hand; the new host shows them in its control panel.
  4. If the address changed, change it in Settings → General. For a fixed address, the wp-config.php generator can write WP_HOME and WP_SITEURL. If you cannot log in, use wp search-replace with --dry-run first, and skip the guid column.
  5. Go to Settings → Permalinks and press Save Changes. This rebuilds the saved rewrite rules.
  6. Log in, open a post, a page and the home page, and check that the browser shows a padlock.
The WordPress Address (URL) and Site Address (URL) fields in Settings → General, both showing http://localhost:8904.
Settings → General, on a lab site. After a move, both fields must hold the address visitors use, with the right http or https.

These two fields matter most. A wrong scheme or host here leads to the redirect loop and mixed content pages below.

The sections above list each message with its fix. WellTend Snapshots is only for the settings-only case: it is not a backup and does not move a whole site, so keep a real backup for steps 1 and 2.

Copy only settings, from staging to live

Use these when live has kept moving since the staging copy was made and you must not overwrite its content.

Edit the files a new host needs

The new host gives you the database name, user, password and host; you type those into wp-config.php yourself. These tools write the other lines and files a new server may need.

Fix what a move breaks

These are the messages people meet after a move. Each page lists the causes and the fixes in order.

If the page is blank or the new host runs a different PHP

A new host often has another PHP version, and a failed copy can show nothing at all. Turn on the log to see the real error.

Sources

  1. Moving WordPress · The official order of steps for a move
  2. Editing wp-config.php · Database constants, table prefix and the site address constants
  3. wp search-replace · Changing addresses in the database, serialized data included; supports --dry-run
  4. wp rewrite flush · Rebuilds the saved rewrite rules
  5. Using HTTPS
Newsletter

One email when something breaks or changes.

New plugins and re-tested guides, about twice a month. Never a sales pitch.