There are lots of “how to” posts and step by step guides out there which are extremely informative. They are great for getting that particular thing done. But sometimes what you need is “How to do this, but also do that while doing this” – These kinds of posts rarely exist, and they are hidden away in the corners of the internet swamped by all the other posts that you have read over and over again and not quite found what you are looking for. Hopefully this post will be different and if you are looking for instructions on how to do what I did then fingers crossed this will be a ‘one stop shop’ for your particular need.
A couple of months ago I decided to move my blog from WordPress.com to a self hosted WordPress.org site for various reasons. Now if you want to do this all you need to do is type that into Google and hey presto you’re sorted, however, I also wanted to change my domain from my mapped domain at WP.com to the new one I was using without losing traffic. This threw a spanner in the works when it came to finding a guide online.
I’m going to consolidate all the tips and tricks I learnt from various books, videos and forums into one multi step by step guide to help others like me in that situation migrate their site without any downtime.
I am going to make a few assumptions:
- You have already set up your new WordPress site with whichever hosting company you have chosen.
- You have chosen a hosting company that allows at least one addon domain.
- You have mapped a custom domain with WP.com
- You are familiar with WordPress, cPanel and Google Search Console.
- You know your way around your domain registrar’s settings.
However, if you are a bit unfamiliar with the above feel free to message me and I’ll try to help you out!
(Before we jump into this I must mention that the following steps worked for me. If you choose to do this then you do so at your own risk – I wouldn’t exactly know what could go wrong, but if it does then I take no responsibility!)
Great, now that paragraph is over let’s begin!
Step 1 – Let’s get your posts
All your hard work over the years is on your old WP.com blog. The whole point of this project is to get all your amazing content onto your shiny new site.
- Head over to your WP.com blog.
- Hover over Tools and click Export
- Click Start Export in the free Export section
- If, like me, you are starting fresh with your new site and you only want your posts then select Posts. If you want all your content then by all means go ahead and export it or select something else at this stage.
- If you want all of your posts then you can leave the sub selections as default and click Download Export File
- An XML file will be downloaded to your PC. Make sure you know the location of this file as we will need it in the next few steps.
- Head over to your self hosted site and hover over Tools and click Import
- At this stage, if you haven’t already done so, you will need to install the Wordpress importer. Click on Install Now under where is says WordPress
- Once installed click Run Importer
- Click Choose File and select the XML file you downloaded from your old WP.com blog. Now click Upload File and Import. (Note: If this file is larger than 2 mb then you may beed to ask your hosting provider to temporarily increase the import size for you, or they could do it for you).
- You can change the author details at this stage, however, I just leave that as it is as I am the only one accessing my site. If you would like to change the author of your posts then do it now.
- This step is important, if you would like to keep your media (pictures, videos etc.) that are included in your posts on your old WP.com blog then you must tick the box labelled Download and Import File Attachments
- Now click Submit
- Head over to your blog page. All your posts will be there waiting for you!
It is important at this stage that you check your permalink structure on your self hosted site. It needs to be set up the same as WP.com, like this:
This is crucial in keeping your SEO intact. When we implement a 301 redirect in later steps, you will struggle to redirect to the correct place when someone clicks on your old domain if you change the structure. Unfortunately the “Day and Name” structure is not the most attractive but you will need to leave it be for a year or 2 before changing it and implementing another redirect then (more on that in another post!)
Step 2 – Redirecting from WP.com to your new WP.org site
Most likely, Google has already crawled your old WP.com blog with both your WP.com default “yourblog.wordpress.com” domain and your mapped “yourdomain.com” domain. We need to set up a redirect to send traffic from “yourblog.wordpress.com” to your new site.
- The first thing you need to do is Cancel your Domain Mapping subscription on WP.com. Once this is done it will cancel immediately and your default domain (yourblog.wordpress.com) will work as your primary domain.
- Now click here to set up site redirect for your blog. This is WordPress’s version of a 301 redirect.
- Follow the instructions to set up the redirect.
- Make sure you use your new domain for the new site as the domain you are redirecting to.
- Once you have paid this will work immediately. You can test this by typing your “yourblog.wordpress.com” domain into your browser’s address bar -> you should be redirected to your new self hosted site’s home page.
Step 3 – Setting up a 301 redirect for your old custom domain named you had mapped with WP.com
You can’t get rid of your old domain name just yet if you want to keep your traffic flowing smoothly to your new site. For that we need to keep it for around 2 more years so make sure you keep it renewed!
- First go to the DNS settings section of yourolddomain.com registrar
- Cancel any name server settings that point to WordPress, or return them to defaults.
- Create an A Record and point it to your new hosting provider’s IP address.
- Now head over to your new hosting provider’s cPanel
- In the Domains section click on Addon Domains and add “yourolddomain.com”
- Go back to the main cPanel area
- In the Domains section click on Redirects
- You are now going to create a redirect for “yourolddomain.com”. For the type of redirect you need to select Permanent (301)
- Choose yourolddomain.com from the drop down list. Do not enter anything after the /
- Redirect to yournewdomain.com
- Select Redirect with or without www.
- Make sure you select
- Click Add
Now yourolddomain.com will redirect to yournewdomain.com. Also because you selected wildcard redirect you will find that it will also redirect your old posts to the same post on your new site.
Step 4 – Setting up change of address in Google Search Console
Now we need to tell Google about the change of address. Google will go and crawl your new site and once it’s satisfied it will change yourolddomain.com to yournewdomain.com in the search results. But don’t worry, while this is taking place your redirects will ensure your traffic ends up in the correct places. Google says it may take up to 120 to index your new site and implement the change of address.
- Head over to Google Search Console
- Click on yourolddomain.com
- Click on the gear icon in the upper right of your screen and click Change of Address
- Follow the instructions to get the process started.
Please note: I noticed a reduction in traffic about a month after this change of address. This happens when Google switches yournewdomain.com from yourolddomain.com in the search results. Don’t worry it will come back to normal levels over a few months!
Step 5 – Set up AMP on your self hosted site
This step is something I learnt from making a pretty big mistake. WP.com automatically allows mobile pages to be loaded using Accelerated Mobile Pages (AMP). Google loves this and you will take a bit hit in traffic if you don’t add this to your site as soon as you switch.
- Go to your wp-admin area for your new site
- Head to Plugins and Add New
- In the search box type in AMP
- Select the plugin made by Automattic called AMP (the logo is a blue box that says Accellerated Mobile Pages Project)
- Install the plugin
- Activate the plugin
- Once activated, head over to Settings and click on Permalinks
- You don’t need to do much here, just click on Save Changes at the bottom of the page to make sure everything works correctly.
Google will recognise this and won’t penalise you for not offering mobile friendly pages (even if your site theme is responsive!).
Step 6 – Start enjoying your new site!
If you have followed the above instructions then you will have migrated your blog from WP.com to WP.org as well as changing domain name without losing any traffic.
As I mentioned, you may have a dip in traffic after a month for a couple of months but it will return to normal soon.
This process worked for me so I hope it will work for you too, however, if you feel it could be done in a different way then please let me know in the comments below and I can edit the steps, of course with credit to you!
Let me know how you get on!
Also published on Medium.