It’s been about a month since I’ve migrated my blog from a hosted service at WordPress.com to hosting my WordPress blog on my own servers. So far, everything is doing quite alright especially the benefits of self hosting WordPress which gives me total control over my contents and my plugins.
So this is intended to be a guide plus some thoughts and recommendations for anyone who wants to move their blog from WordPress.com over to their own web host.
Moving from WordPress.com has advantages over moving from another service – pretty much all of your content can be migrated over without any loss of information. This includes posts, pages, categories, tags and even users if you have more than one. It’s also another reason why it is so easy to make the switch.
Why host your own WordPress?
For a while, my blog was hosted on WordPress.com. It was great – it was easy to set up, easy to use (especially with Live Writer), always available and best of all, it was all free.
But then, after a while there are some limitations that start to show up once you’ve used WordPress.com for a while. For a start, the URL that comes with your blog is in the form of http://<blog name>.wordpress.com/, and you can’t really change this your http://<blog name>.com or anything shorter. Well you could, but you’d have to pay USD$10 a year just so that you can use your own domain name and point it at your WordPress.com blog. Registering the actual domain name costs extra, of course.
Apart from the domain name, all of the WordPress.com feature upgrades turns out to be included when you host your own WordPress blog. This includes uploading videos, customising the CSS look and feel, none of their ads and the option to put your own ads in, unlimited users and as much disk space as your hosting provider gives you. If you’re already reaching or exceeding the free limits of WordPress.com, then why not change over?
There is actually a community of people whom self host the free and open source WordPress blog engine, which can be sourced from http://www.wordpress.org/.
Intended audience
This is a recount of the steps I took in migrating my blog. If you want to use this as a guide to do the same, then you would need prior knowledge or experience in setting up a basic web site.
The Procedure
The basic procedure involves exporting the contents of the blog posts from the old wordpress blog, and then importing it into the new self hosted WordPress installation. Although, there are some other things can be done to make it even more painless.
Step 1: Find a web host
The first thing that we are going to do is to find a new place on the internet to be the ‘physical’ home of the blog. The easiest way to host the blog is to find a web host on the internet that would allocate to you some web space and bandwidth for a subscription based cost, or for free if you’re happy with suboptimal service levels. Look up potential hosts using an online directory.
At the same time, take note of the requirements to run WordPress, and make sure that the web host you’re about to sign up with meets their requirements. For an in-depth guide to setting up WordPress, see the WordPress Codex.
When you sign up to a web hosting provider, you’ll be asked to nominate a domain name to be associated with the space. If you don’t have a domain name yet, this might be a good time to register your domain name through your web hosting provider.
I’ll leave it up to you to choose your favourite web host, but in this post I’ll assume that you have chosen one that uses the cPanel control panel system.
Step 2: Set up the domain name
This step really depends on whether you registered your web site separately or through your web host. If you registered through the web host, more often than not they’ll have it all set up for you.
In my case (www.edmundtse.com), I have my domain name registered through Melbourne IT so I needed to change my domain’s “nameserver” – this nameserver controls which web host the domain name will send visitors to.
After this, it takes about a day for the re-delegation to propagate out to your ISP to let them know of the change of servers. So for now, if I type www.edmundtse.com into my browser, it’ll still try to take me to the old place for a while before it realises I’ve changed it. For now, if you have an alternative method (e.g. using web host’s IP address) to access the control panel, we can proceed setting up the new blog.
Step 3: Set up the database
Since WordPress is database driven, we’ll need to set up a MySQL database for it. In cPanel, we’ll use the MySQL database wizard to set one up.
After setting up the database, we’ll have a new MySQL database that’s all set up and ready to go, and make sure to record the database name as well as the username and password that was specifically created to access the newly created database. Keep in mind that this username and password is not the same as the cPanel one, so don’t get them mixed up.
Also note that if you’ve selected say “wordpress” as your database name, then you’ll end up with an actual database name of your username followed by your nominated database name, like “username_wordpress”. This is the same for the database username as well.
Step 4: Install WordPress
Now we get to the fun part of setting it all up – using the famous (apparently) famous “5 minute install”. It actually takes less than 5 minute if you know what you’re doing.
First, we need to download the WordPress package from their website. Get the gzipped file, since it’s a little smaller than the zip package. Afterwards, we’ll need to upload that file onto the web host, via cPanel’s file manager. So log on to cPanel (instructions from your web host) and click the File Manager icon.
If you prefer to upload that file in another way, then that’s fine as well. After uploading the file, we’ll then extract the contents of the file archive in file manager as well. We do this by first clicking to select the uploaded file and then click the ‘Extract’ icon at the toolbar.
Then, we move all the files from with the newly created folder to the root folder of the web site, which should be /public_html/. Next, we navigate to our web site to set it up.
The first step here is to give the blog a name (probably the same name as the old one), and give it an email address so that it can create an administrator account.
When we click the log in button to continue, and enter the admin details to log in, we’ll finally get to the WordPress dashboard! This dashboard is almost identical to the one at WordPress.com, but you won’t find the section for buying more features because you already have them all.
Step 5: Export content
Now we have to export the content from our existing WordPress.com blog. So we log on to the blog dashboard at http://www.wordpress.com/ and go to “Export” under the “Tools” section.
Clicking on the button “Download Export File” will then let you download a XML file that contains all of the posts, pages, categories, tags, comments and drafts. Its pretty much a dump of the WordPress database in a format that is specifically designed to hold your WordPress data. It just so happens that we can’t directly access the WordPress.com database – that would be quite a security risk if we were able to!
We then save the file onto the computer. Let’s just name that file “wordpress.xml”, and save it on the desktop, where it is readily accessible.
The steps from now on can be done almost in any order, but here’s what worked for me.
Manually transfer settings
Unfortunately I couldn’t find anything that automatically transfers blog settings across, so we’ll need to enter the blog details by hand. Go to the settings section in the dashboard, and we’ll first see general settings. Fill those out with the same information from the existing blog, but leave the new URLs as is.
Work through the rest of the subsections and make sure they are correct. If you’re not sure what a setting should be, refer to your existing blog settings. I want to point out some bits in particular: In the ‘writing’ subsection, enable remote publishing so that you can use Live Writer to post to your blog. In ‘Permalinks’, you might like to change the permalink structure to ‘day and name’ so it’ll look more like the WordPress.com blog.
Find and install blog theme
Once the settings are done, we’ll customise the look and feel of the blog. Go to the ‘Appearance’ section and then ‘Add new theme’. Try to search for the name of your old theme, but there is a chance that it’s not listed. In that case, you can either use another theme or search for it on other areas of the internet. I am currently using Sadish’s ‘MistyLook’ theme, which isn’t listed in the themes list, but it’s actually still available on the creator’s website. He also has other free WordPress themes that are quite clean and elegant.
Install theme
If you found the theme via WordPress, installation couldn’t be easier. Just click the ‘Install’ button and then use the ‘Activate’ link to use it. If you’re downloading the theme package from elsewhere then we need to upload and extract the files to /public_html/wp-content/themes/theme_name/.
Afterwards, we can find the new theme as ‘available’ in the ‘Themes’ subsection under ‘Appearance’. Here we can activate the theme to change the blog look and feel.
Delete starting content
Before we import any content, let’s first delete all existing posts, pages and comments. If we don’t delete the about page, and during import there’s a page of the same name, then it’ll be renamed to about-2, which we don’t want.
Import content
Now we’ll need to import the content from the old blog. Previously, we’ve exported an XML file containing our posts, pages, comments, etc. But there is a problem which causes your links to break after importing. This is because when you upload and link to a file onto the WordPress.com blog, this link remains the same even after you’ve imported the content into the new blog. So before we import, we need to rewrite those links so that they would point to the correct location. Do the following find and replace (ViM commands given), changing the domain name to your needs:
%s/edmundtse.wordpress.com/www.edmundtse.com/g %s/edmundtse.files.wordpress.com/www.edmundtse.com\/wp-content\/uploads/g
So in the new blog, we’ll go to “Import” also under the “Tools” section to import the content. The process imports the content that’s stored within the XML file as well as goes forth and downloads all the files you’ve uploaded onto your media library as well.
Transfer widgets
If you use widgets, you’ll also need to fix them up as well. There are a few widgets that’s not included in your WordPress installation by default, but all you have to do install the plugin and then you’ll find the widget.
Transfer links
If you have links and blogroll friends, then you’ll need to manually copy them across as well.
Install plugins
You might find that some features Akismet is installed by default, but WordPress.com Stats is not. It needs to be installed as a plugin. There are tons and tons of plugins you can use for WordPress on WordPress’ own website, and another bunch at http://wp-plugins.net/. Lifehacker recommended a few which is great to get started with.
And that’s it!
Happy blogging!
Maybe I should move my blogs too – but I’m too busy to worry about that atm.
Ive looked at the end. thank you for this article.