Migrating a large WordPress site is a task that requires careful planning, preparation, and execution. A well-executed migration ensures that your site and data are transferred correctly, efficiently, with minimal downtime and issues. The task should be delegated to an experienced and skilled WordPress professional/developer that will handle any issues that may arise before/during and after the migration.

Downloads: If you you to download this article in a PDF format scroll to the end of the article.

Steps

  • Migration audit - what to migrate or not to migrate. That’s the question
  • Preparation
  • Archiving/Packaging the site
  • Test migration
  • Planning the migrations
  • Doing the migration

Migration audit - what to migrate?

When it’s time to migrate a WordPress site, business owners tend to be laser focused on quickly switching the site to the new hosting provider and can totally forget about any other services that are used at the current hosting provider.

Of course, the new provider may promise a better performance and is probably more cost-efficient but don’t skip the planning process.

Those services may be emails or other self-hosted tools like CRMs and ticket management systems and so on.

If you’re using an external mail hosting service such as Zoho or Google Workspace, then you’re good.

If you have emails with the current hosting, then I highly recommend that you delay that email migration until the WordPress site is fully migrated and is working well on the new hosting. That way you will be handling fewer problems at the same time.

Otherwise you risk missing important emails from your clients, support tickets and so on. 

To only switch the WordPress site, you will have to only update the values for these A records @ and www at your registrar’s control panel. Make sure you lower those records TTL’s values as much as possible. That would be a temporary thing. For more information, see How to Speed up DNS Changes for a Faster WordPress Migration from the WPSandbox blog.

Preparation

Site Specific Information

What kind of WordPress site is it?

Is it a company site and a blog?

is it a site + ecommerce section (powered by WooCommerce) ?

Is it WordPress Multisite setup?

How large is the database?

What is the current php version?

What is the current WordPress version?

What is the current database version?

It’s good to collect and share as much information as possible with the WordPress professional or the team that will be doing the migration so they can prepare well in advance for any surprises. The more they know, the better will foresee any issues.

Access

Do you have access to the registrar (e.g. GoDaddy, NameCheap, etc)?

Who is your DNS Server? This can be your registrar but can also be a different service provider.

Can you find out if your current and new hosting has SSH access or can you request a temporary one so the work is done more effectively?

Do you have (S)FTP access?

Do you have the control panel accounts for both hostings?

Test Migration(s)

We will assume that the migration is really important, so we highly recommend having 1-2 test migrations first at minimum before doing the actual move to ensure everything works as expected. 

Also, it’s less stressful when you and your team test the migrated site on a staging server and find all the issues before your users do. When users see an error message on a site they may wonder what else is broken with this site and may lose confidence and not complete a purchase.

Test migrations are a great way to test for compatibility issues because servers from different hosting providers have different hardware and software setups:

  • different php versions (old hosting runs php 7.4 and the new hosting runs php 8.3)
  • different database versions or brands (MySQL vs MariaDB)
  • different software configurations (php, MySQL, MariaDB)
  • different php extensions installed on each server
  • different caching and limits
  • different firewall rules

If the differences are a lot, part of your site may not work properly, and it will either show various errors on some pages or a blank white page.

If you have your own server and can install different tools, you may ask somebody to install docker. With that software you can have an environment that you know for sure it worked great in the past without any problems.

As always, there are many ways to achieve something; the same applies for the WordPress migration.

Option 1:  New hosting provider may do it for free

Ask your new hosting provider if they are willing to do a free WordPress migration.

Many companies do that for new clients. We highly recommend that you  share different information about your site so they can check with their colleagues if they are able to migrate a large site like yours or if they see that it's too large maybe they will suggest a more powerful server or tell you that they won't be able to help or host your site because it's too large

Option 2: Use a popular backup/migration plugin.

Try the most popular backup plugins to see if they will be  able to complete the export process. 

Keep in mind that archiving the site is 50% of the job. The next step is to import the files onto the new server. Some of the backup plugins may need a paid addon to be able to import the exported site even though it was exported by the same plugin.

Popular backup plugins are:

Great Idea: Because the Media library (wp-content/uploads) is usually the folder that takes the most space you can exclude it during the initial archiving/packaging process that way the archive file should be a lot smaller. You will have to transfer the files later either manually via the (S)FTP or via File Manager.

Option 3: WP-CLI

WP-CLI or WordPress Command Line Interface, is a powerful cli tool that allows developers and site administrators to manage WordPress installations through a terminal interface. It simplifies many routine tasks, such as updating plugins, managing themes, and configuring multisite installations, all without the need to log into the WordPress admin dashboard. WP-CLI is especially beneficial for handling bulk operations and automating repetitive tasks, making it an invaluable tool for anyone managing multiple WordPress sites. It provides an efficient way to interact with WordPress core, themes, and plugins.

Option 4: Hire us

We are not kidding :) If you need any help with a WordPress migration, contact us and we will help you with that. 

We like to make servers talk to each other, so the transfer is way faster. Transferring sites between servers is very fast because they have great connectivity.

Post Migration Fixes

After the files have been transferred and the database imported you need to ensure the following

  • update wp-config.php to contain the database credentials of the new host. In some rare cases we've seen sites connecting to external database servers.
  • update .htaccess rules in case the site was in a folder previously or at the new hosting it's a folder
  • check for old paths. You will need to find what was the full path on the old hosting e.g. /home/wpsandbox.net/public_html and if the path is the same on the new server. There are still some plugins that still use absolute paths when you first install them. Why though?!? Not sure if this is fixed but wp-super-cache plugin used to do that.
  • remve cache folders from wp-content folder e.g. wp-content/cache, et-cache and other folders that contain cache in their name. You can rename the folder and prepend zzz_ in front of their names.
  • if you need to replace some text or links in the database use proper plugins or wp-cli for this because you risk corrupting your data because WordPress serializes the data and then stores it into the database. If you use replace functions of MySQL/MariaDB it will happen quickly and incorrectly.
  • If it's a WordPress multisite if the domain is the same then you're good. If you're switching domains you have to make multiple changes in the wp-config. php file and in the database. Conact us for more information.
  • Run database optimization (using wp-cli you can run wp db optimize)

How to test if the test migration was successful?

The very first thing is to enable debugging because you want to know about any errors.

To enable WordPress debugging. See https://wpsandbox.net/wordpress/how-to-enable-debugging-mode-in-wordpress-p1026

Update all plugins, themes and WordPress itself and click on every single section of the site and also in the admin area.

Inspect the wp-content/debug.log file, and also if you access web server log files too.

Errors can show up in those two locations.

Accessing the new server

To access the new server, you need to either create a subdomain (e.g. test1.example.com) and point it to the new server’s IP address OR update your hosts file to point to the new server. The latter is quicker but will only work for the current computer. 

It has its pros and cons. The pros are that when you import the site, there won’t be a need to replace the database links to point to the new subdomain. WordPress stores its current URL address and will redirect if there’s something different about it.

The drawback is that all the colleagues will have to change their hosts file and that’s not very convenient, and someone may forget to reset it and may make content changes to the new server on the first test migration and later will have to post that content again.

Doing the actual WordPress Migration

If the test migration was successful, then that’s really good. Congratulations!

Next, it’s time to pick the best time to do the migration. It’s highly recommended that it’s done in the beginning of the week between Monday and Wednesday. Thursday may also work but you need to have people available for any issues that may come up. Also, it’s good to pick the time when the site is not that busy.  If your business is based in the US then you can ask your colleagues that are located in Europe to do it in their morning because in the US it will be sometime between 2-3am-5am and not that many of your customers would be affected.

Notifying users

You need to put a banner on your site telling people that there’s a scheduled WordPress migration on a certain date. 

It’s good to put this information on your status page as well.

Sending them an email to let your customers know about the upcoming maintenance is a great idea too. You can use the opportunity to ask them to keep an eye on any issues that way pop up after the migration and that they should  let you know ASAP so you can fix the issues right away.

I also like the idea when somebody visits a site that’s going under (scheduled) maintenance to enter their email or phone number to be notified when the maintenance is done.

You can even offer them a discount code at 10% off of their next purchase (e.g. mi10).

That way they will most likely come back to check your website again when all is done.

Additional Considerations:

  • Backup and Restore: Always have a backup strategy in place. Regularly backup your site before and after migration to avoid data loss.
  • Post-Migration Testing: Continue monitoring the site for a few weeks post-migration. Ensure all functionalities are working correctly and address any issues promptly.
  • Performance Optimization: Use the migration as an opportunity to optimize your site for better performance. Clean up unnecessary plugins and optimize your database.

Downloads

Frequently Asked Questions regarding large WordPress site migration

What site size is considered a large WordPress site?

This answer can vary from site to site and hosting.

Generally sites between 10-25GB and/or sites that couldn’t be easily transferred with a backup plugin. The backup plugins usually fail during the archiving/packing process, or the hosting provider blocks the access to the site due to excess resource consumption (CPU, RAM and disk operations read/write).

What information do you need to prepare before the migration starts?

You need to have all the accounts ready including 

  • domain registrar account
  • DNS server account (if different from the registrar)
  • control panel access - old and new servers
  • Ideally, both hosting providers offer SSH access

What is the best time to perform a migration?

Early in the week (Monday to Wednesday) and during off-peak hours for your primary audience.

How much does it cost to migrate a WordPress site?

It really depends on the approach you choose. If it's possible to do it using a backup plugin then it would be your time + the code of paid addons that may be required.

Some hosting providers usually provide free WordPress migrations, but you'll have to purchase some of their pro hosting plans or a VPS server.

The actual migration could consist of additional tasks for example if the new hosting breaks some outdated plugins you'll either have to replace them or hire somebody to rewrite the code if it's important.

How long does it take to migrate a WordPress site?

A well planned migration and with all the accounts working & with access to ssh/sftp it should take less than a day to complete the migration.

If you're switching domains that will require some careful database replacements. Please, avoid using your db manager (phpMyAdmin or Adminer) to make replacements because you'll break data.


Disclaimer: The content in this post is for educational purposes only. Always remember to take a backup before doing any of the suggested steps just to be on the safe side.
Referral Note: When you purchase through a referral link (if any) on this page, we may earn a commission.
If you're feeling thankful, you can buy me a coffee or a beer