If your current hosting server is causing you problems, migrating your WordPress site to a new server is an effective way to leave them behind once and for all, not that WordPress migration doesn’t produce enough issues on its own.
From potential file loss to migration downtime and domain name configuration issues, there are all manner of potential problems that can get in the way of ensuring a smooth and seamless migration.
However, with a few preventative measures and plenty of proactive troubleshooting techniques up your sleeve, you’ll be well-armed to get past each of those obstacles with relative ease.
In this guide, we’ll show you how to troubleshoot common WordPress migration issues, sharing practical solutions and clear, step-by-step instructions to ensure your big server move goes without a hitch.
How to Troubleshoot Common WordPress Migration Issues: 5 Simple Steps
1. Finding and Replacing Missing Resources
One of the most frustrating issues during WordPress migration is losing crucial files and resources along the way.
At first, it may not be immediately apparent that specific website components didn’t make it, which is why it pays to learn how to test your website after the migration so that you’ll know how to check for missing resources.
One way to do this is to thoroughly navigate your website and verify if all pages, images, documents, and other resources are intact. Pay special attention to mission-critical elements that are the cornerstone of your website.
If you notice any missing content or broken links, that’s a pretty solid tell-tale sign that some of your files are missing.
If you’re using a high-quality WordPress migration plugin, they should provide you with migration logs that can provide valuable insights into the migration process and any errors encountered.
Finally, you can also compare your newly migrated site to the last backup copy you made. By doing so, you can identify any discrepancies or missing files.
Article Continues Below
What to Do About Missing Files
Speaking of backups, creating one is the most effective way to troubleshoot missing WordPress file problems.
If you don’t already have a backup of your site, see our step-by-step guide to backing up WordPress before migration for help creating one.
In most cases, missing files and resources can simply be replaced by importing their backup copy to your new site.
2. Minimizing Migration Downtime
We all know that downtime is one of the worst possible problems we could face as website owners.
Whether your site is offline altogether or lacks enough server resources to provide even basic functionality, it not only annoys your customers to the point that they bounce but may also have significant repercussions for your business in the form of revenue loss and the inability to meet the needs of your customers.
Unfortunately, the very nature of migrating a website means that mission-critical tasks such as data transfer and DNS propagation will result in at least some downtime.
What to Do About Migration Downtime
The best way to troubleshoot migration downtime and stop it from significantly impacting your bottom line is to simply choose a time for migration when your website receives the least amount of traffic.
Log in to Google Analytics and pay attention to your traffic trends, looking for those off-peak hours when any service disruption is likely to be minimal at best.
That said, even if you schedule the migration during off-peak hours, it’s essential to communicate with your users.
Place a notice on your homepage and use your email marketing, social media, and other channels to inform visitors about the scheduled downtime.
This proactive approach may be the one thing that saves you from permanently losing customers to your competitors due to your site migration.
3. Resolving Domain Name Configuration Issues
Even after you successfully transfer all your data from one server to another, there are still a host of problems you could encounter regarding domain name configuration.
The most common problems in this arena relate to your DNS records, which are responsible for translating human-readable domain names into IP addresses that computers can understand.
The first is simply that DNS (Domain Name Server) records contain the wrong information, meaning your site won’t be accessible via your domain name until they’re fixed.
The second is that DNS changes typically take a while to fully propagate across the Internet, meaning that during this period, some users may still be directed to the old server while others can access the new server. This can result in intermittent accessibility issues and inconsistencies in website availability.
What to do About DNS Issues During WordPress Migrations
To troubleshoot DNS problems, you can ask two pertinent questions:
Are my DNS records properly configured?
You can answer this question by accessing your domain registrar or DNS management console and reviewing the DNS settings for your domain.
Take note of relevant DNS records, such as:
- A (IPv4)
- AAAA (IPv6)
- MX records
Now, look at the DNS information for your new hosting server.
Do they match?
If not, learn how to update your DNS records with the new domain name servers and give it time to propagate.
Have I waited enough time for DNS updates to propagate?
Although some users should be able to access your site on its new server within a few hours, it typically takes 24 – 48 hours for DNS propagation to be completed. In some extreme cases, it may take up to 72 hours.
If you think the propagation process is taking too long, you can speed it up by lowering the TTL (Time to Live) value which determines how long DNS servers or user devices can cache the information.
If the TTL value of your DNS records is set to a high, the propagation process could take a seriously long time, so lowering it should help move things along quicker.
4. Troubleshooting Database Connection Errors
Few common WordPress migration problems cause more headaches than getting to the end of the whole process only to receive the terrible news that there’s an error establishing a connection with the database.
The big problem with such messages is that they don’t provide an exact error code or details about the specific cause of the connection failure.
You can immediately see what an issue this is. After all, how can you fix the error if you don’t know what it is?
Fortunately, there’s a solution:
How to Use WP Debugging to Identify Causes of Database Connection Errors
To get more specific error codes and figure out what’s going wrong with your newly migrated site, you can enable WordPress by opening your wp-config.php file and looking for the following line:
define( ‘WP_DEBUG’, true );
When you have it. Change true to false so that it reads:
define( ‘WP_DEBUG’, true );
From there, save the file, and reload your website to generate a debug.log file in your “wp-content” directory. You can then use this file to review the detailed error messages and codes associated with the database connection problem.
How to Fix Common Database Connection Errors
Finding the specific error code for your connection error is a great start, as you can then look up this error online and research how to fix it.
To save you some time, however, let’s look at how to tackle some of the more likely causes of your connection errors.
Incorrect Database Credentials
One possible cause is that the database credentials specified in the WordPress configuration file (wp-config.php) don’t match the credentials of the new hosting server.
With that in mind, it makes sense to start by looking in your wp-config file and checking all of the following:
Each one should match the credentials of your new hosting server.
Database Server Configuration
We’ve encountered this next problem on more than one occasion in our own work, and trust us; we know what a headache it can be.
There are times when the database configuration on your new server is different from your old one.
For example, the database server software version or settings might be incompatible with the WordPress installation.
In that case, you’ll need to log into your hosting account and look at the set-up of your database server configuration to ensure it’s enough to meet the minimum requirements for running WordPress.
Firewall or Access Restrictions
In some cases, firewall settings or access restrictions on the new hosting server may block the WordPress site from establishing a connection to the database server.
This usually happens if the firewall rules or server configurations are not correctly adjusted during the migration process.
As such, you’ll need to check those settings in your hosting account and ensure they allow your WordPress site to connect with your database server.
5. Resolving 404 Errors Caused by Permalink Problems
Last but not least, one of the most frequent migration issues many WordPress users face is that permalink structures don’t always migrate properly.
Ultimately, this results in broken links and those dreaded 404 errors.
For example, if your site was structured on your old server as yoursite.com/post-title, but your new server is set to yoursite.com/year/month/post-title, any hyperlinks pointing to the first URL are no longer going to work.
Luckily, this is also one of the most straightforward problems to fix.
First, go to your WordPress dashboard and navigate to Settings – Permalinks.
Check that your permalink structure matches the one used on your older server, and save the changes.
How to Troubleshoot Common WordPress Migration Issues: Three Key Takeaways
Although there’s a multitude of things that go awry when migrating your WordPress website, the step-by-step processes above will help you troubleshoot the five most common problems that typically get in the way of a successful migration.
To recap, here are the most important lessons to take away from this guide:
- Take preventative steps to mitigate problems – Learning how to back up your WordPress site could prove to be a lifesaver if you lose files during the migration process. Meanwhile, lowering the TTL value of your DNS records in advance will help speed up the time it takes domain changes to propagate.
- Database connection errors can have a multitude of causes – Adjusting your wp-config file to enable debugging mode is a quick and effective way to pinpoint the exact error code so that you can look for an appropriate solution.
- Don’t forget to check your permalink structure – 404 errors after a WordPress migration may be caused by little more than incorrect permalinks. Check your settings to ensure they’re the same on your new server as they were on the old one.
For more tips, see our complete step-by-step WordPress migration tutorial.