Migrating WordPress websites is something that happens all the time. Either because it needs to move to a new host or motivated by downtimes and malicious attacks, any webmaster has already needed to proceed a migration at least once.

However, no matter how good those migration plugins become, we are still facing issues here and there. Well, so let’s talk about the most common issues on that and how to solve them easily.

URLs can be found

Right after migrating, you experience some pages that return a 404 or images and assets may have disappeared out of the blue. That happens because some plugins, and migration procedures, ignore some of the entries within WP’s database. That means: even if you have changed the URL and domain, in some cases the database still has some records with the old domains or subdomains.

The easier way of fixing it? By accessing the database and running a query that replace all the old URLs for the new one. For those who have never dealt with SQL, that sounds a lot of work. However, either by using phpMyAdmin or any other software like MySQL Workbench, you can just run these instructions and run a query:

UPDATE wp_options SET option_value = replace(option_value, ‘http://olddomain.com’, ‘http://newdomain.com’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

UPDATE wp_posts SET guid = replace(guid, ‘http://olddomain.com’,’http://newdomain.com’);

UPDATE wp_posts SET post_content = replace(post_content, ‘http://olddomain.com’, ‘http://newdomain.com’);

UPDATE wp_postmeta SET meta_value = replace(meta_value, ‘http://olddomain.com’, ‘http://newdomain.com’);

Of course, if you have changed the database table prefix, remember to include the correct names for those tables before running the query.

Fatal errors

Another common issue while migrating websites are fatal errors. Well, first of all, you can check whether all files and data have been migrated or not. But sometimes, that happens because of a different environment.

If all devs and WP users used technologies like Docker for that, the environment wouldn’t be a problem. However, most websites still use shared hosting services, which means environment variables or PHP extensions can be completely different – as well as MySQL/MariaDB versions and so on.

First of all, while migrating any script, please make sure that the debug mode is set as true. Check the wp-config.php file to assure that the WP_DEBUG constant is set as true. Once the migration is complete and working, you can set it back to false.

Some of the fatal errors are caused by plugins which require particular PHP extensions or version, so try to rename their folders one by one. If you are using the debug, you can also get hints from error messages from the browser.

Premium plugins or themes

Sometimes premium plugins or themes, after a migration, may cause disruptions in the website. That happens because some of them are designed for allow domains to use the service. Once you change the domain and host, you may need to update that information. Otherwise, that plugin or theme will possibly disallow your new domain to use the premium features.

Poor performance

Nobody talks about that, but some problems faced by webmasters after a migration have nothing to do with the migration process itself. New features and plugins offered within the community demand a lot in terms of server memory or processing capacity.

And if your new hosting service is unable to meet those requirements, the result will probably be a 500 error message or some sort of disruption. Before migrating anything, make sure that the new host’s specs meet your requirements.

Bad practices

Finally, if you are a client and hired someone to migrate your website… keep your eyes open. Of course one can perfectly do that job by using a plugin like WP All Migration, but if something goes wrong, he needs to know how to fix it.

Even if you are not familiar with coding or the hosting processes, ask him about what he intends to do and how the migration will occur. If he is not sure about how to do that or just tell you about the “wonders” of using a plugin for that, maybe it is an opportunity for looking for a couple of quotes more.