keepcalculator

06 Numbers and Powers

How to Manually Migrate a WordPress Site

Card No. 06·26103 · Updated · Standard formula, shown below

Manually migrating a WordPress site moves its files and database from one hosting account or server to another while preserving the site’s content and settings. You’ll need access to both hosts, a backup, and the new site’s database details; expect a brief maintenance window while you transfer and test the site.

What You’ll Need

  • Access to the old and new hosting accounts, including file transfer (SFTP or hosting file manager) and database tools such as phpMyAdmin.
  • A complete backup of the WordPress files and database. Keep an untouched copy somewhere safe.
  • The new host’s database name, username, password, and database server address.
  • The domain’s DNS management access, if you are changing hosts while keeping the same domain.
  • A text editor for editing configuration files and, optionally, a search-and-replace tool that supports serialized data.

Step-by-Step

  1. Record the old site’s settings. Sign in to the old hosting control panel and note the WordPress directory, PHP version if available, and database details. In WordPress, note the site address under Settings > General. Check for custom themes, plugins, uploads, and any subdomains or subdirectories that must move too. Do not change DNS yet.
  2. Put the site into maintenance mode, if practical. Choose a quiet time and pause publishing, orders, bookings, or other activity that changes data. For a busy site, arrange a final database export shortly before the DNS switch; otherwise, new content created after an earlier export may be missing at the destination.
  3. Back up the database. In the old host’s database tool, select the database used by WordPress and export it as SQL. A compressed SQL file is fine. Confirm that the export completed and save it locally. If you do not know which database is in use, check the DB_NAME value in the site’s wp-config.php.
  4. Download all WordPress files. Use SFTP or the file manager to download the entire WordPress installation, including hidden files such as .htaccess when present. Include wp-content, which contains uploads, themes, and plugins. Do not assume a fresh WordPress download can replace these files.
  5. Create a database at the new host. Use the new host’s control panel to create a database and a database user, then grant that user the required privileges for that database. Record the database name, username, password, and host value exactly. The database host is often, but not always, localhost; use the value supplied by the host.
  6. Upload the site files. Upload the downloaded files into the new host’s document root for the domain, often named public_html or a domain-specific folder. Avoid placing the files one directory too deep. If the host already installed WordPress there, back up those files before replacing them.
  7. Import the database. Open the new database in its database tool and import the SQL export. Large imports may exceed upload limits; use the host’s supported import method or ask support for help rather than splitting SQL arbitrarily. Check for an import success message and confirm that tables appear.
  8. Update the database connection. Edit the uploaded wp-config.php and set DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST to the new values. Preserve the existing quotes and punctuation. Do not post or send this file publicly; it contains credentials.
  9. Handle a domain or URL change. If the domain stays the same, you usually do not need to replace URLs in the database. If the domain or installation path changes, update the old site URL references using a WordPress-aware search-and-replace tool that handles serialized data. A plain SQL text replacement can corrupt serialized settings. Make a database backup before changing URLs. Temporary host preview URLs may require special handling; follow the host’s migration instructions.
  10. Test before switching DNS. Use the new host’s preview facility or a temporary hosts-file entry if you know how to configure one. Check the homepage, several posts and pages, images, menus, login, forms, and important plugins. In WordPress, visit Settings > Permalinks and click Save Changes to refresh rewrite rules; you do not need to alter the permalink structure.
  11. Point the domain to the new host. Change the DNS records or nameservers as directed by the new host. DNS updates can take time to appear consistently, and some visitors may temporarily reach the old server. Keep the old hosting active during this period. Once the new site is confirmed, enable or verify HTTPS and check that redirects work.
  12. Complete the move and retain backups. Test again using the live domain, then remove maintenance mode. Keep the old account and backups until you have verified the site and any email or other hosting services still work. Do not delete the old database or files immediately.

Common Mistakes

Frequent problems include exporting the wrong database, omitting hidden files or the wp-content/uploads folder, uploading files into the wrong directory, and entering an incorrect database host or password. Another common error is changing URLs with a basic text replacement that damages serialized data. Changing DNS before the new copy is tested can also make diagnosis harder. Keep a backup before every database or configuration change.

Tips

Use SFTP rather than plain FTP where available, and transfer files in binary or automatic mode. Compare file and database sizes with the originals to spot incomplete transfers. If the new host supports the same PHP version and extensions as the old one, match them initially; change versions only after the migration works. Store database credentials securely, and never paste them into public support posts. For an online store or other site with frequent changes, plan how to capture final orders or submissions so they are not split between the old and new copies.

Troubleshooting

  • “Error establishing a database connection”: Recheck all four database constants in wp-config.php, confirm the user has privileges, and use the database host supplied by the provider.
  • Blank page or server error: Check the hosting error log, confirm the files are in the correct document root, and verify PHP compatibility. Temporarily disable plugins by renaming the relevant folder inside wp-content only if needed; restore its name after diagnosis.
  • Images or styles are missing: Confirm wp-content/uploads and theme files uploaded completely. Check the browser address for old-domain links and use a serialized-data-safe replacement if the domain changed.
  • Pages show “Not Found”: Save the permalink settings in WordPress and confirm the server supports the site’s rewrite rules. Check that the appropriate .htaccess file was transferred on Apache hosting; other servers may use different configuration.
  • The old site still appears: DNS changes may not have reached your network yet. Check the domain’s records and the new host’s preview, and avoid repeatedly changing DNS while propagation is underway.
  • Import fails or times out: Check the database size and host upload limits. Use a provider-supported command-line or assisted import method for large backups, and ask the host for the correct procedure.

Frequently Asked Questions

Will manually migrating WordPress delete my old site?
No. Downloading and exporting make copies. The old site remains until you remove its files, database, or hosting account.

Do I need to change the WordPress URLs?
Not when the domain and installation path remain the same. If either changes, update URL references carefully with a tool that supports serialized data.

Can I migrate without changing DNS?
Yes. Upload and test the destination using a host preview or another temporary method first. Change DNS only after the copy is ready.

How long does a manual migration take?
It depends on the size of the files and database, transfer speed, and DNS behavior. Allow time to test the site and keep the old host available during the transition.

Will my email move with the WordPress files?
Usually not. Email may be managed separately through hosting or another provider. Check its DNS records and mailbox migration requirements before changing nameservers.

What if my new domain is different?
Back up the database, then update site URLs with a WordPress-aware search-and-replace method. Test links, media, redirects, and HTTPS before considering the migration complete.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →