Migrating WordPress.com hosted site to self hosting

This post runs through the process I went through in migrating WordPress.com hosted site (kadenmcdevitt.com) over to my own self hosted WordPress site.

History of my WordPress.com (kadenmcdevitt.com) site

Back in February 2015 my 7 year old nephew Kaden McDevitt was diagnosed with liver cancer. At the time I quickly setup a WordPress.com hosted site with his own domain name. We felt this was a good way to keep family and friends up to date with his progress.  At the time I knew very little about WordPress. After a very stressful and difficult time that eventually resulted in  a liver transplant Kaden is doing remarkably well. This was no doubt due to the wonderful medical team, a super strong family, and one very brave and resilient boy.

3 years on and my knowledge of WordPress and hosting has grown and so I decided to port the site over to my own hosting site (currently with GoDaddy) and I can manage and host the site. I could then close down the wordpress.com site. Having not performed this before, the following is the process I followed for the migration.

Getting Started (or use the Guided Transfer option)

I wanted to be confident that I could convert the existing site fully before I embarked on the actual migration. Therefore I wanted to make a copy of the site running on my local development setup to test as much as possible beforehand. I found that WordPress.com has its own subdomain site dedicated to describing the migration process called Move WordPress. I also had the domain name with WordPress.com, and if you can’t be bothered with the hassle of the site migration yourself then WordPress.com offers a paid option (currently $169 USD) of a Guided Transfer. I was obviously quite happy to perform this migration myself.

To start with you need to export the content of existing WordPress.com site. To do this I logged on to the site as Administrator and choose the built-in Export ALL data option (posts, pages, images, etc). This created an XML file that I saved on my local machine. I then moved on to creating a local copy of the site.

Local Copy of site (for testing)

Previously for local development of WordPress sites I had used MAMP to test locally before live deployment. I found MAMP very straight forward to setup and use on my Windows environment. You can download and setup MAMP for FREE very easily. When running MAMP in your browser you can choose the “phpMyadmin” option to access you MySQL databases. I needed to create a NEW database for setting up this new development site.
The following steps were taken to setup the development site:

  1. Create a NEW database in MySQL – I named mine “kadenmcd”
  2. Make sure you create the database as type “utf8_general_ci”
  3. Make sure you have User access to this new database.
  4. In your MAMP installation location, there should be a “htdocs” folder – create a new folder for the site (ie. kadenmcdevitt in this case)
  5. Download the latest WordPress.org base files, and expand these files in the “kadenmcdevitt” folder.
  6. Follow the Famous 5-minute installation guide for WordPress, which includes connection to the new database by editing the “wpconfig.php” file (rename/copy from the “wpconfig_sample.php” file) for DB_NAME (kadenmcd), DB_USER (root), DB_PASSWORD (root), DB_HOST (localhost:3306 (from MAMP)), DB_CHARSET (utf8).
  7. Go to MAMP in the browser – go to your sites – choose the new site based on the folder name (kadenmcdevitt). Now follow prompts to create username and password.

You now should have a bare bones WordPress site setup. Now onto Importing the existing site data.

Importing  data and configuring site

To import all the data from the current site I choose the “Import” option from within the WordPress tools. Make sure you convert imported posts over to the appropriate users that created the content. In my case the import took quite a while (and it is not clear that it is doing anything!) – about 20 minutes I think.

Now the steps I took for configuring the site:

  1. Install and set the theme (in my case I was using the standard 2015 wordpress theme)
  2. Remove the default Post and Page (that comes with the default wordpress package) from the site.
  3. Customise the site again
  4. Install Akismet and Setup Key (for handling spam comments)
  5. Make sure your permalinks are set to “Day and time” as this is the WordPress.com behavior.
  6. Install All-in-one migration and backup plugin for Export.
  7. Test it all out!

On to the Hosted site

I used the “all-in-one migration” plugin I made a FULL backup of my current site. The backup produced turned out to be over 800mb. On my Host (with GoDaddy) I created a new WordPress site through the c-Panel and placed it under a subfolder (kadenmcdevitt) of my current site. I also installed the “All-in-one migration” plugin and attempted to perform an “Import”. Unfortunately the FREE plugin only handled up to 500mb, so I decided to go back to the standard Importer instead. Unfortunately my hosted site had some sort of time-out on the upload – which appeared to be about 300 seconds – and so came up with an error. HOWEVER, it appeared that if I refreshed the page it would continue with the Import. I needed to refresh/retry the page another 30 more times approximately, and managed to get all the data (mostly images) uploaded.

I went through similar process (as described above – setup and customise theme, setup akismet, set permalinks, etc) and got the site working well. Now I wanted to switch the domain name over to me and have it accessible through its current access point.

Transfer Domain Name

In my case I also had my domain setup with WordPress.com – so I wanted to move this across to keep it together. I used the guide – Move Your Domain to go through this process. As part of the process you will get a Authorisation Code (also known as EPP code) sent to you via email. You also need to set the domain nameservers – check guide for instructions. I then used another guide for my GoDaddy host (Transfer Domain). In my case I needed to purchase a transfer of the domain name ($10.99) which added another 1 year to the registration.

The process enter the Authorisation Code (EPP), getting further emails from GoDaddy new host (for Transaction ID and Security Code) and entering these into GoDaddy host account. At that point the transfer becomes “pending” and can take up to 7 days to transfer.

About 5 days later I received a confirmation email of the completion of the domain transfer.

Setup New Domain on Self-hosted account (GoDaddy)

Unfortunately it wasn’t intuitive for me and hence took a while for me to work out what I needed to do. A bit of googling found that I needed use the “Addon Domain” facility with the GoDaddy cPanel to add the “kadenmcdevitt” domain. To allow me add a NEW domain I need to upgrade from my BASIC account (which allowed for only ONE hosted domain) to a DELUXE account (Unlimited sites) for an extra $3 a month. Once I added the new domain I could modify the existing test site to the new domain URL.

SSL (https) setup

As per my previous post on https I created a FREE SSL certificate for the domain using Lets Encrypt, and then went through the process as described in this post to convert the site to https, including handling redirects, etc.

You can checkout my nephews blog (although there is no real updates on it since October 2016!) at https://kadenmcdevitt.com