Moving WordPress requires a matching copy of its files and database at the new location. This guide describes a manual move or copy and the checks needed before the destination becomes the live site.
Prepare both locations
- Back up all WordPress files and the database and verify the recovery copy.
- Check the destination’s PHP, database and web server compatibility.
- Prepare the domain, HTTPS and an empty document root.
- Plan a maintenance period or final synchronisation for orders, comments and other changing data.
If you use a backup plugin’s restore package, follow that plugin’s restore process. Uploading its archive into a public directory does not automatically install a working site.
Copy the files and database
- Export the source database through an approved database tool.
- Transfer the actual WordPress files, including hidden files and
wp-content, to the correct destination directory using SFTP or another protected method. - Create an empty database and user through the destination hosting panel.
- Grant that user the permissions required for the site.
- Import the SQL export into that exact database.
- Edit the existing
wp-config.phpdatabase name, user, password and host to match the destination. Preserve its other settings.
Keep exports, backup archives and credentials outside publicly served directories.
Update URLs if the address changes
Review WordPress Address and Site Address, including any WP_HOME or WP_SITEURL overrides. A table prefix is not necessarily wp_.
Use a serialisation-aware WordPress migration tool for stored URLs in content, widgets and plugin settings. Test the proposed replacement first. Resaving permalinks updates rewrite settings; it does not replace old URLs throughout the database.
Verify and change over
Test HTTPS, public pages, administrator access, media, forms, plugins and scheduled tasks. Check file ownership, permissions and rewrite rules.
For a copy used as staging, restrict access and disable live payments, outgoing mail and other external actions as appropriate for that environment.
Capture any final source changes before updating DNS or the live address. Keep the previous site and recovery copies until the new location is verified.