How to Update WordPress Plugins and Themes Safely
WordPress updates are essential for security, but a careless update can break a live site. Follow this routine — backup, staging, update order, verification — every time.
Home / Blog / WordPress and Performance / How to Migrate a WordPress Website Safely
Moving a WordPress site to a new host is one of the most common operations in web hosting — and one of the most feared. The fear is justified: a migration touches your files, your database, your URLs, and your DNS, and a mistake in any one of them can take the site offline or corrupt it silently.
The good news is that a safe migration is a procedure, not a gamble. Follow the sequence in this guide — backup, prepare, copy, test, switch, verify — and the move becomes boring, which is exactly what you want.
Before you move anything, know what you are moving. A WordPress site has three parts:
wp-config.php file holds the database credentials, the site URLs, and security keys. It is small, but the site will not run without a correct one.A complete migration moves all three, and verifies all three at the destination before anything is switched off at the source.
Before you touch anything, take a full backup of the live site: files plus database. Then verify it:
This backup is your rollback plan. If anything goes wrong later, you can restore it and try again. Never start a migration without it.
Set up the new hosting account and check the environment before you copy anything:
upload_max_filesize, post_max_size, max_execution_time, and memory_limit. A large site may need higher limits than the defaults to import its database.There are three common approaches. All three work; choose the one that matches your comfort level.
A migration plugin. Plugins such as Duplicator, All-in-One WP Migration, or UpdraftPlus (with its migrator) package the site into an archive, which you then import at the destination. This is the easiest method for most people, and the plugin handles the URL search-and-replace for you. Watch the size limits: free versions often cap the archive size, and very large sites may need the paid version or a manual move.
WP-CLI (command line). If you have SSH access at both ends, WP-CLI is the fastest and most reliable method: export the database with wp db export, copy the files with rsync, import with wp db import, and fix the URLs with wp search-replace. This is the professional’s choice, but it requires comfort with the command line.
Manual (phpMyAdmin + FTP/SFTP). Export the database from phpMyAdmin, download the files by FTP or SFTP, upload them at the destination, import the database, and update wp-config.php. It works, but the URL replacement must be done carefully — a naive find-and-replace on the raw SQL can corrupt serialised data (WordPress stores some settings as serialised PHP arrays, where the string length is part of the data). Use a tool that understands serialisation, such as WP-CLI’s search-replace or a dedicated search-and-replace plugin, rather than editing the SQL file in a text editor.
This is the step that separates a safe migration from a gamble: test the site at the destination before you change DNS.
How to test without changing DNS:
Then test thoroughly:
/wp-admin) works, and you can log in.Also check the PHP error log at the destination for warnings your old host may have hidden. A plugin that throws deprecation warnings on PHP 8.3 will tell you now, while the old site is still live.
A day or two before the switch, lower the TTL on the domain’s A record (and AAAA record, if you have one) to 300 seconds. This means that when you change the record, resolvers around the world pick up the new address within minutes rather than hours.
Then update the DNS records to point at the new server’s IP address. Do not cancel the old hosting yet.
Warning: do not change the nameservers and the hosting at the same time unless you have to. If your DNS is hosted by a third party, keep it there and only change the A record. If your DNS is hosted by the old host, move DNS first or make sure the new host has a complete copy of the zone. Changing two things at once makes failures much harder to diagnose.
After the DNS change, verify from the outside, not just from your own computer (which may still have the old address cached):
Then watch the site for 24–48 hours. Keep the old hosting active for at least a week as a fallback — if something breaks, you can point DNS back in minutes.
Once the site has run correctly on the new host for a week, cancel the old hosting plan, remove any temporary test URLs or hosts-file entries, raise the DNS TTL back to a normal value (for example, 3600 or 86400 seconds), and take a fresh backup on the new host.
A safe WordPress migration is a sequence: back up and verify, prepare the destination, copy the site, test it privately, lower the TTL, switch DNS, verify from the outside, and only then cancel the old host. Skip the testing step and you are gambling; skip the backup and you are gambling without a safety net. Done in order, the whole move is uneventful — and uneventful is the goal.
Related reading: How to Choose WordPress Hosting in 2026, WordPress Caching Explained, and How to Transfer a Domain Without Disrupting Email. See our WordPress hosting plans.
Reviewed 25 October 2026. Prices, plan contents, and availability for Offshore Hosting plans are [TO BE CONFIRMED] — this article does not state them.
WordPress updates are essential for security, but a careless update can break a live site. Follow this routine — backup, staging, update order, verification — every time.
A backup you have never restored is a hope, not a safety net. Learn what a complete WordPress backup contains, how often to run it, and how to test a restore before you need one.
A staging site is a private copy of your website where updates and changes can break safely. Learn how to set one up, keep it in sync, and push changes to live without surprises.