Navigating your first WordPress migration can be an intimidating and treacherous process. Every developer has their horror stories of broken pages, missing images and session timeouts. Some of these are inevitable and should be taken with pride in the name of learning. In this article we’ll go over a couple things to keep in mind so you can keep your first WordPress site migration as smooth as possible.

Don’t query about queries

A crucial step in migrating a WordPress site is making sure the database is pointing to the right URL once it’s been imported into its new destination. Having a master SQL command that you can reference saves time and headaches. We use the following once a database has been uploaded to its destination server to point it in the right direction:

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

UPDATE wp_posts SET guid = REPLACE (guid, ‘http://previousurl.com’, ‘https://currenturl.com’);

UPDATE wp_posts SET post_content = REPLACE (post_content, ‘http://previousurl.com’, ‘https://currenturl.com’);​

UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, ‘http://previousurl.com’, ‘https://currenturl.com’);

When using a master command such as this be mindful of which URL you are changing and whether you are migrating to an SSL (HTTPS) enabled server or not.

Screenshot, Screenshot, Screenshot

Taking screenshots and recording your steps is one of the most 20/20 hindsight things you can cover during a migration. Various pages and views of a website pre-migration as well as DNS settings *before* they are switched over are crucial things to have handy, as setting these back to their original state can be a time sink or not even possible in some cases. The extra second this takes could be saving you hours of troubleshooting later on.

Disclaimer: This is not a front-to-back tutorial for migrating a WordPress site, and there are many great resources for that online already. These are just extra tips that may help you find a migration process that works for you. Please use in conjunction with a reputable guide for WordPress migrations.