by
on
under
Permalink

Ultimate Guide to WordPress Migrations and SEO: Pre-Migration Prep

There are many reasons you might need to migrate a WordPress site – a change of domain name or perhaps moving a blog from a subdomain to a subdirectory. Whatever the reason, it is important to factor in SEO when considering a WordPress migration. But why, exactly, do you need to keep SEO in mind?

There are many signals that can affect organic rankings in search engines such as Google. These range from the text used on a web page, the inbound links from other sites, to the load times and optimisation of a page for mobile devices.

So in this article – the first in a two-part series – I’ll walk you through the ways in which WordPress migrations can impact your SEO, and the pre-migration steps you should carry out to minimize a hit to your organic search rankings.

How Does Migrating WordPress Affect SEO?

#1: Changing URLs

Search engines view different URLs as different pages, even if the content is identical. If the appropriate steps aren’t taken for URLs that change, then their organic rankings and the value of inbound links could be lost.

#2: Changing Content

When determining the relevance of a web page to a user’s search query, content signals are some of the most important. If you are using the migration as an opportunity to refresh your WordPress website’s content, any changes could have a positive or negative effect on your organic rankings.

#3: Changing Code

Part of the WordPress migration might involve changing the theme used on your website. This will change how the site is coded and could affect how well optimised it is for search engines. There may also be unforeseen issues introduced if the developer didn’t have SEO as a priority whilst building the theme, such as crawling issues or mobile device optimisation.

#4: Changing Performance

Page speed has been a ranking signal for many years now, and Google has recently been placing even greater emphasis on web page performance with regards to mobile devices. You can see this with developments such as AMP (Accelerated Mobile Pages) . Your WordPress migration could have involved changing how the site is built, as well as its hosting. Both of these changes could have affected your website’s load times.

The WordPress Migration Process for SEO

So, you can see that a WordPress website migration could have an impact on organic rankings and traffic. But how can you ensure the best possible migration for SEO?

You can divide the process of the migration into two phases: pre-migration and post-migration. This is a two-part series, with this particular post covering the SEO tasks you should carry out before the WordPress migration. The second post is going to cover what you need to do once the migration has been carried out, including testing, to ensure that everything has gone according to plan.

Getting Started: Pre-Migration for WordPress

Testing Your Server

If you are setting up the new site on a staging environment for testing, then you need to make sure that search engines cannot crawl the test site. The easiest way to do this, is to block search engines using the robots.txt file.

This file should be placed in the root of your staging environment. For example, if your test site is on a subdomain, the robots.txt file would be located at http://test.example.com/robots.txt. You need to have the following directive in your robots.txt file to block search engines from crawling the test site:

.gist table { margin-bottom: 0; }

Setting up Google Search Console and Analytics

You should make sure that you have Google Search Console setup, as well as an analytics platform. A popular and free analytics solution is Google Analytics . If you don’t have analytics setup for your site, do this now. It can provide a lot of insight into your visitors’ behaviour, acquisition and conversions. You’ll need these tools for pre-migration tasks and post-migration checks.

Identifying Any Current SEO Issues

At this point, you also want to identify any SEO issues your current website might have. This step is particularly important if either the theme is being changed and/or the content is being refreshed. By flagging issues early, you can ensure that the new site build and content avoids these mistakes.

If you have the budget, then you can bring in an SEO specialist or an agency to help you identify issues. If not, then there are a number of SEO tools, such as Woorank (free trial) and Onpage.org (free for 100 URLs), that can help you to identify common SEO problems.

Onpage.org

SEO Plugins Worth Checking Out

Is your current site using any plugins for SEO? If not, now is a good time to either start using one or to at least plan one to use on the new site after the WordPress migration. WordPress SEO plugins can help with a number of tasks, such as controlling which pages are indexed, XML sitemap generation, and editing metadata.

There are a number of SEO plugins available. Here at WPMU DEV, our SmartCrawl plugin is a great option for helping to drive traffic to your site. SmartCrawl features the ability to send sitemap updates to search engines, custom descriptions and titles, auto link keywords to any URL, built-in Moz integration and more.

Record Your Current SEO Performance

You’ll want to be able to see what did and didn’t work post-migration. To do this, you’ll need to know how your website performs before migrating your website. You can use both Google Search Console and your analytics platform to get a good idea of your organic search performance.

From Google Search Console, you will want to record the following metrics:

  • Search Analytics clicks
  • Search Analytics impressions
  • Search Analytics click through rate (CTR)
  • Search Analytics positions
  • Internal links

Search Console only stores Search Analytics data for 90 days. I often find this data is something I want to refer back to in the future. If you want to compare data over many months, particularly at a granular keyword and landing page level, the last 90 days of data might not be enough. Err on the side of caution and download your pre-migration Search Analytics data. You should download “Queries,” “Pages” by various combinations of devices and search types for the last 90 days.

Search Console Search Analytics download.

You should also download the pre-migration internal links report. You can compare this with the post-migration data if you are having any issues and believe internal linking may be the problem.

If you are using an analytics platform, try and have this collecting data for at least a few months prior to the WordPress migration. This should provide you with a reasonable amount of data to compare pre-migration and post-migration.

Checking Your Website’s Page Speed

Since page speed is a ranking signal for Google, you will want to keep a record of how well your site is optimized pre-migration. You can use tools such as Google PageSpeed Insights or GTmetrix to get an idea of how fast your pages load and where improvements can be made. GTmetrix actually provides both YSlow and Google PageSpeed scores, as well as storing registered users’ most recent page analyses.

Or better yet, you can use our free WP Checkup tool here at WPMU DEV to get an overview of your SEO, site performance and security.

You should test a variety of pages, such as the homepage, single posts, category archives, tag archives and static pages. Make a note of how long it takes each page to load, the number of resources required, the total page load size and what the recommended actions are needed to optimise page loads. You will want to refer back to this information during the post-migration phase.

WP Checkup is our free tool for testing your website's SEO, performance and security.
WP Checkup is our free tool for testing your website’s SEO, performance and security.

SEO

SmartCrawl is watching. Simply scan, list & fix

SmartCrawl helps you ensure your website is optimized for search engines and aid it in climbing towards higher search results ratings. Set global defaults and customize specific pages and post types to your SEO desire.

TRY SMARTCRAWL FREE
LEARN MORE

Create XML Sitemaps for Your Site

Ensure that your website will have XML sitemaps post-migration. These are useful for getting your content crawled and indexed by Google. If you are unsure of how to do this, simply install the SmartCrawl plugin for automated sitemap creation and the ability to send sitemap updates to search engines.

If you aren’t currently using XML sitemaps, then it is recommended you implement them during the pre-migration stage. This will allow you to test them in Google Search Console and ensure they are working without errors.

You can read Google’s documentation on XML sitemaps here .

Set up Redirects for URLs That Change

Depending on the size of your website, this can be one of the most time consuming pre-migration tasks. It is also one of the most important. By correctly redirecting all of the URLs that are changing during the WordPress migration you will:

  • Alert search engines to your content moving to new URLs
  • Ensure visitors clicking on inbound links get to a live page rather than a 404 error page
  • Have the best chance of smoothly transitioning your organic search rankings from the old URLs to the new URLs
  • Retain the value of inbound links to the old URLs

To do this effectively you will want to create a redirect mapping document. Open up your favourite spreadsheet program and create one column for Old URLs and one for the New URLs you will be redirecting to. You now need to identify all of the URLs that you will want to redirect.

When redirecting URLs for a WordPress migration, don’t just focus on the URLs that are live on the current site. You should redirect any URLs that have inbound links, even if they are URLs from previous versions of the site or they are pages that have been removed prior to the WordPress migration.

There are a number of sources you can use, some free and some paid. You should use as many as you have access to. The sources I use to identify URLs to redirect are:

#1: Search Console

Export Search Analytics Landing Pages

If you followed the section earlier regarding recording current SEO performance, you should have already downloaded your landing pages from Search Analytics

Note that Search Analytics will often limit the number of results to approximately 1000. If you have more pages than this, then you will need to use the Search Console API to get all of the URLs.

Export Most Linked Content

  1. Click Search Traffic
  2. Click Links to Your Site
  3. Under You most linked content, click on More »
  4. Export your most linked content by clicking Download this table
Search Console most linked pages download.

Export Internal Links

  1. Click Search Traffic
  2. Click Internal Links
  3. Export your internal link pages by clicking Download this table
Search Console Internal Links download.

Export Crawl Errors

  1. Click Crawl
  2. Export your crawl errors by clicking Download
Search Console Crawl Errors download.

#2: Google Analytics

Export Landing Pages

  1. Click Behavior
  2. Click Site Content
  3. Click Landing Pages
  4. Set the start and end dates to cover the entire time that you have collected data
  5. Scroll to the bottom of the page and set Show rows to 5000
  6. Scroll to the top of the page and click on ‘Export’ and then select the file format you want

Note that if you have more than 5000 landing pages, you will need to paginate through each batch of 5000 and export each set of results.

Google Analytics Landing Pages export.

#3: Inbound Link Monitoring Tools

I generally use Ahrefs and/or Majestic for monitoring inbound link data; however, there are a wide range of tools out there for you to use.

Export Landing Pages From Ahrefs

  1. Search for your domain
  2. Below the Pages in the left-hand menu, click Best by links
  3. At the top right of the page click Export
  4. Select Full Export
  5. Click Start Export
  6. The export will be available to download once it has finished processing
Ahrefs pages export.

Export Landing Pages From Majestic

  1. Select Historic Index
  2. Search for your domain
  3. Click Backlinks
  4. Click Export Data
  5. Click Advanced Report
  6. On the next page ensure Advanced Report and Domain are selected then click on Create Report
  7. On your Reports page, click on the domain you just created this report for
  8. Hover over Download Options
  9. Click on ‘Download Backlinks
  10. Click on Prepare Download
  11. Navigate to your Downloads page
  12. Click on the link Backlinks for {yourdomain.com}
  13. The data you will want to use in the export is the Target URL column
Majestic SEO export data.

#4: Screaming Frog

Screaming Frog is one of the most popular web crawling tools. There is a free version available that allows you to crawl up to 500 URLs. The premium version allows you to crawl an unlimited amount of pages.

Run a Site Crawl

  1. Open Screaming Frog
  2. Click Mode and select Spider
  3. Type your website’s URL into the input box at the top of the window and click Start
  4. Let the program run whilst it crawls your website
  5. Once it has finished, within the Internal tab click export
Screaming Frog

Once you have all of this data, you want to get all of your domain’s URLs that you have collected and place them into the Old URLs column in your redirect mapping spreadsheet. De-dupe these URLs and then you are ready to begin mapping your new URLs to the old URLs. Make sure you redirect URLs to either the URL that is directly replacing them or at least the most relevant content that remains on the site.

When the redirect mapping is complete you will need to consider how you will implement the redirects. The redirect can either be manually added to the .htaccess file or a redirect plugin can be used.

If you want to use the .htaccess file then there is a lot of useful information over on the Apache website. Generally you will be using the Redirect and RedirectMatch directives. For more complicated redirect matching, you will want to use Apache’s mod_rewrite .

A popular redirect plugin for WordPress is Redirection . This allows you to easily add redirects and provides a considerable amount of flexibility and control. You can read the documentation for this over on the official site .

WordPress Redirection plugin.

You do not want these redirects to go live yet, but you do want to have them ready for when you migrate your website. You can have the new version of your .htaccess file with the redirects ready to replace the pre-migration .htaccess file. If you are using the Redirection plugin, then you can add your redirects via the plugin and just leave them set as disabled until it comes time to migrate your site.

Please note, you should only be redirecting URLs that are changing. If you try to redirect URLs that remain the same, you will cause redirect loops. This will make the page unreachable until the redirect is removed.

Wrapping Up

That concludes part one of this WordPress migration SEO guide. At this point, your site should be ready to migrate, at least in terms of SEO.

In part two, I’ll be covering what you need to do immediately after the WordPress migration, how you can check if everything went correctly and on-going analysis you can do to make sure your WordPress migration hasn’t negatively affected your site’s SEO.

Original Post From WPMU Blog

Leave a Reply

Your email address will not be published. Required fields are marked *