Migrating a WordPress website from one hosting provider or server to another is a common task that most website owners will have to undertake eventually. The process involves moving your WordPress database and file system from one place to another.
With attention to detail throughout the pre-migration, actual migration, and post-migration steps, the process can go smoothly and take as little as 2-4 hours, in addition to around 48 hours for DNS changes to fully propagate.
In this guide, I walk you through the necessary steps and considerations in-depth, providing actionable tips to make your next WordPress migration painless.
The Pre-Migration Process
Before starting the actual migration process, there are some important preparatory steps to take to ensure things go smoothly. A pre-migration checklist can prevent scrambling mid-process to find critical info or troubleshoot issues.
Gather Login Credentials and Access
First, gather all the login credentials, FTP access, and other account access you’ll need for the migration. Specifically:
- Hosting control panel login for current host and new host
- File manager/FTP login info for the current host
- WordPress admin login credentials for the current site
- Have a text file or spreadsheet handy to organize all of this
You may also need server addresses, ports, or other host-specific info. Gather this beforehand since you likely won’t have access to your current hosting account once the migration begins.
Install WordPress on New Host (Optional)
Some migration methods require having WordPress installed on the new host before migrating. Other methods allow migrating into a blank slate.
If required for your migration method, install WordPress on the new host server beforehand. Even if not required, having a clean WordPress install ready can simplify migrating your files.
Your new host may offer auto-installs like Softaculous to streamline this. If manually installing, get the latest WordPress version from WordPress.org.
Use plugins like Duplicator to install necessary plugins like security and performance plugins on the new site instance ahead of time.
Back-Up Your Existing Website
Before making any changes, back up your existing WordPress site. This safeguards you in case anything goes wrong.
Use a dedicated plugin like UpdraftPlus, VaultPress, or BackWPup for full backups. These backup your WordPress database and all your files.
You can also manually back up just your database via phpMyAdmin and download your wp-content folder via FTP.
However you do it, have a recent backup ready before migration day so you can restore it if needed.
Prepare Your Site for Migration
To get your site ready for migration:
- Put your site in maintenance mode to stop new content changes during migration. Use a plugin or code snippet.
- Disable caching plugins and other plugins that could conflict with the migration process or new server environment. For example, disable Cloudflare, cache optimization plugins, and security plugins.
- Make a plan to re-enable and configure these plugins properly on the new host once the migration is complete.
- Halt recurring scheduled tasks like backups or content imports that could run mid-migration.
Cleaning Up Your Site
Take time before migrating to clean up your website by:
- Deleting any unused plugins to reduce bloat.
- Removing unused themes, uploads, pages, posts, comments.
- Optimizing images to reduce unnecessary file size being migrated.
- Cleaning up your database by optimizing tables, removing spam/expired comments, and fixing errors.
- Removing cached files from your wp-content folder.
This cleanup time eliminates unnecessary data from making the migration process slower and the new site bloated.
The pre-migration phase is critical for laying the groundwork for a smooth transition. Rushing into the migration without this prep often leads to issues down the line.
Being methodical in gathering info, backing up your site, and cleaning things up avoids many headaches.
WordPress Migration Methods
When it comes to actually migrating your WordPress site, you have three main options:
- Import via XML
- Use a Migration Plugin
- Manual Migration
Import via XML
You can use their simplified XML import process if migrating to WordPress.com from a self-hosted WordPress site. This allows you to migrate your content without moving your database and files.
To use XML import:
- Install the Jetpack plugin on both your current site and the new WordPress.com site. Jetpack allows easy connections between the two environments to enable imports.
- In the WordPress.com dashboard, go to Tools > Import. Here, you can connect Jetpack to pull data from your self-hosted site.
- Select Import from WordPress and enter your self-hosted site URL.
- WordPress.com will now use Jetpack to pull the XML file from your self-hosted site and import pages, posts, comments, and more into your WordPress.com site.
- Media files, plugins, themes, and other customizations must be manually moved and re-uploaded since only content is imported.
- Since only content is brought over, you may need to reconfigure menus, sidebars, widgets, and other settings.
XML import works best for sites with mostly simple content and basic layouts. It does not transfer your full database, plugins, customizations, theme files, or media files – these must be moved over manually later. So, you lose a lot of what makes your site unique.
Use a Migration Plugin/Service
Migration plugins/services provide automation to back up your full WordPress site and import it to a new location with minimal effort compared to manual migration.
Popular options include:
- All-in-One WP Migration: Exports your site as a ZIP file that you can import to a new location. Offers both a free version and a paid “Pro” version with more features.
- WP Migrate DB Pro: Migrates your database by pushing and pulling it between hosts. Works great even for very large databases.
- Duplicator: Creates a complete snapshot package of your entire site, including database, files, plugins, and customizations. Allows “one-click” migration.
- BlogVault: Subscription backup service that includes automated migration features.
- XCloner: Creates a full backup of WordPress, including database, plugins, themes, and files. Offers differential backups to only backup changes.
The process usually involves:
- Installing the plugin on your current WordPress site.
- Use the plugin to create a backup or snapshot package of your entire site and download it to your computer.
- Installing the plugin on your new, freshly installed WordPress site on the new host.
- Using the plugin’s import feature to upload and restore the backup package to the new site location. This automatically transfers the database and files.
- Additional tweaking is needed for some plugins, like updating URLs, resetting passwords, or reconfiguring plugins.
Migration plugins are often the fastest and easiest way to migrate compared to manual migration. However, some technical skill is needed to troubleshoot any issues that arise.
Follow each plugin’s documentation closely!
Manual migration is a good option for those who want total control and visibility into the migration process.
Here are the steps involved:
- Export your database from your current host via phpMyAdmin or a tool like WP Migrate DB. This allows you to save your full database as an SQL file on your computer.
- Download your WordPress file system via FTP as a zipped copy of wp-content. Or, download the full WordPress installation files for even more flexibility.
- Copy your plugins, themes, uploads, and other files from the file download to your computer so you can re-upload them later.
- Create a new database on your new host server to migrate your data. Make a note of the new database name, user, password, and other credentials.
- Edit the wp-config.php file in your copied WordPress files on your computer to contain your new database’s credentials and server info.
- Upload the WordPress files via FTP from your computer to your new host’s server into the proper directory.
- Import your database backup SQL file into the new database using phpMyAdmin or a database management tool like Adminer.
- If changing URLs with the migration, run a search/replace on the database to replace old URLs with your new host domain.
- Test that the site functions properly on the new host before changing domains or DNS.
A manual migration takes more time and technical skill but gives you full oversight and control over all aspects of the migration process.
It can be the most thorough and customizable option for very large or complex sites. However, more chances for human error exist if not careful.
Whichever migration method you choose—XML import, a dedicated plugin, or manual—the most important thing is picking a process that works for your specific site and skill level.
Testing different migration options can help decide on the best solution.
Post-Migration Best Practices
After completing the actual migration process, there are still some important steps to take before opening your site up to visitors again.
Follow this post-migration checklist to finalize the transition to your new host.
Test Your New Site
First, you must access and thoroughly test your newly migrated WordPress site without redirecting your domain. There are a couple of ways to do this:
- Use a temporary URL provided by your host to preview your new site before changing DNS records.
- Update your local computer’s host file to map your domain temporarily to your new host’s IP address. This lets you preview your regular URL.
- Some migration plugins like Duplicator let you preview migrated sites within your WordPress admin.
Testing the new site properly before going live is crucial to catch any issues while your old site is running as a fallback option in case serious problems are found.
Once you’ve migrated, it’s time to re-enable important plugins that you may have disabled before migrating, such as:
- Security plugins like Wordfence
- Caching plugins
- Backup plugins
- CDNs like Cloudflare
Check that any settings are carried over properly and tweak as needed. Be careful when re-enabling caching plugins – flush any legacy cached data first.
Thoroughly Test Every Aspect
Conduct comprehensive tests on your newly migrated site to check the following:
- Site design and formatting on all key pages
- Images and media are displaying correctly
- Forms and functionality work as expected
- Site performance (use PageSpeed Insights and webpagetest.org)
- Links, menus, and search work properly
- Plugins still function properly
Fix any issues before launching the site publicly. It is better to catch things during testing than have users encounter problems now.
Point Domain to New Host
When you’re satisfied with the migrated site, it’s time to switch your domain’s DNS records to point to the new host’s servers. Log into your domain registrar and update the nameservers or A records.
Exact steps vary by registrar – we provide registrar-specific tutorials on the steps.
This process can take up to 48 hours to propagate globally, so be patient. Use a DNS propagation checker to track it.
Keep the Old Hosting Account
We recommend keeping your old hosting account active for at least 1-2 weeks after migrating. If anything crops up on the new site, this gives you an instant rollback option.
Once you’re confident everything is running smoothly, you can fully cancel the old hosting account.
Following this post-migration checklist helps ensure your newly migrated WordPress site launches smoothly and successfully with no surprises!
Reasons to Migrate a WordPress Site
Several common scenarios typically prompt site owners to migrate their WordPress site to a new host or server environment. Knowing these cases can help you recognize when it may be time to consider a migration for your own site.
Outgrowing Your Current Hosting Plan
One of the most common reasons site owners migrate is outgrowing their existing hosting resources, whether storage space, bandwidth, or available features.
As your site grows and evolves, the traffic, storage needs, number of plugins, and complexity may exceed what a basic shared hosting account can comfortably accommodate.
You may suddenly get frequent notices that you’re reaching storage limits, experience more downtime, or find that caching plugins are no longer helping performance.
Migrating to a larger shared plan or specialized WordPress hosting with resources scaled for growth can help get things running smoothly again.
Seeking Better Site Performance
Another reason site owners migrate is to seek better performance.
Issues like frequent downtime, slow page load speeds, latency on admin pages, or difficulties handling traffic surges indicate your current host’s infrastructure is struggling. This frustrates users and hurts your business.
Migrating to a host with better uptime, page caching, CDNs, and a more optimized WordPress infrastructure can dramatically improve performance.
Pages may load many seconds faster, greatly improving user experience and SEO.
Moving to a Different Hosting Type
Some reach a point where they need to migrate to an entirely different hosting type to meet their site’s needs, like moving from shared to VPS or dedicated hosting. This gives you far more control, customization, and resources for large or complex sites.
Or you may migrate from traditional hosting to specialized managed WordPress hosting that’s fine-tuned for optimal WordPress performance.
Going Live From a Development or Staging Site
Another scenario is migrating a site from a development or staging environment to production.
After building and testing a site locally or on a staging server, it must be migrated to live production hosting.
This is an important step in launching a new or redesigned WordPress site.
Dissatisfaction With Current Web Host
Finally, some migrate because they’re unhappy with their current web host for various reasons – frequent downtime, poor performance, lack of support, hidden fees, or other issues.
If you’ve given your host plenty of time to address grievances, but problems persist, it may be time to migrate somewhere you can get your money’s worth.
Migrating WordPress Multisite Networks
Migrating a WordPress Multisite network has its own considerations and challenges compared to a single site.
The process involves moving a network of websites sharing the same codebase and often database. The reasons for migrating Multisite vary: consolidating multiple standalone sites, outgrowing current resources, or restructuring the network’s configuration.
How Long Does Migration Take?
How long it takes to migrate a WordPress site depends on several factors:
- The size of your site: A simple brochure site with a couple of pages will be much faster to migrate than a large e-commerce site or content-heavy site with thousands of posts and media files.
- Number of plugins/customizations: Sites with many plugins, custom code, and complex functionality will take longer.
- Connection speeds: Your connection and your server’s connection impact migration speed.
- Migration method: Automated tools are faster than manual migration.
The hands-on time for running through all pre-migration checks, executing the migration process, and post-launch testing is around 2-4 hours for experienced users.
Non-technical users may need more time to work through the steps carefully.
The bulk of total migration time will be spent transferring your database and files from one host to another.
Depending on site size and connection speeds, the transfer can take anywhere from 10 minutes for very small sites to several hours for large, complex sites with many images and files.
After the migration, you must also wait up to 48 hours for DNS changes to propagate and fully redirect your domain to the new host.
Migrating a WordPress website from one hosting provider or environment to another involves carefully moving both your database and files. The process can go smoothly with good preparation, using the right migration tools for your needs, and methodical post-migration testing.
While the steps involved may seem complex, clearly understanding what needs to be done and following WordPress migration best practices ensures your transition is a success.
Conduct thorough pre-migration preparation, such as backing up your site and gathering needed credentials. Carefully test your newly migrated website before changing DNS. And give DNS propagation sufficient time to avoid any downtime.
Also Read: How to Enable Major WordPress Auto-Updates