Testing a move from WordPress.com to self hosted WordPress blog

Yesterday I was talking to m wife's cousin, Mihir, about blogging. He mentioned that he had started a blog about SQL Server (he's a DBA). His blog is hosted on WordPress.com but because WordPress.com does not allow javascript and ads he wanted to move to Blogger. However, Blogger provides no tools to move a blog to another host.

He was also concerned that readers would not be able to find the new home of his blog. I suggested that he purchase a domain name. Besides the benefits of branding his blog, he would also be able to move his blog at any time without losing readership.

That got me thinking and before I gave any advice on the matter I decided to see for myself how easy it would be to move my blog from WordPress.com to a self-hosted WordPress.org blog.

XAMPP logo

I chose to create a hosting environment on my MacBook. WordPress requires a system with PHP and MySQL. Specifically PHP version 4.2 or greater and MySQL version 4.0 or greater. Any web server will do. I know that OS X includes all of those but I decided I wanted something that I could easily remove. I downloaded and installed the XAMP package provided by Apache Friends, a non-profit project to promote the Apache webserver. The goal of the project is to provide an easy to install and configure web environment around the Apache web server, the MySQL RDBMS, PHP and Perl. From the Apache Friends web site:

At the moment there are four XAMPP versions:

  • a version for Linux systems (tested for Ubuntu, SuSE, RedHat, Mandrake and Debian),
  • a version for Windows 98, NT, 2000, 2003, XP and Vista,
  • a beta version for Solaris SPARC (developed and tested under Solaris 8),
  • and a beta version for Mac OS X.

The OS X version installs like a regular OS X application. To start up the XAMP services I launched the XAMP Control Panel and started the Apache and MySQL Services.

XAMPP Control Panel

Before installing WordPress I created a new database user (wordpress) and table to hold the WordPress blog data and gave it full privileges.

macbook:~ root# /Applications/xampp/xamppfiles/bin/mysql -u root mysql> create database wordpress;
mysql> create user 'wordpress'@'localhost' identified by 'password';
mysql> grant all on wordpress.\* to wordpress;

With the database set, I downloaded the WordPress tarball from WordPress.org and installed under the /Applications/xampp/htdocs/ directory. I chose the 5-minute install. For that, I edited the sample configuration file to add the database name and database username and password and ran the installation PHP script from a web browser. I also downloaded and installed the OpenID WordPress Plugin ( why not? ). What is OpenID?

Geekery:

OpenID is an open, decentralized, free framework for user-centric digital identity.

Huh?

OpenID eliminates the need for multiple usernames across different websites, simplifying your online experience.

Oh, ok!!

I like OpenID. I love going to a blog and with just a few keystrokes posting a comment with a link back to my site ( as well a cool avatar from Gravatar ).

Export blog from WordPress.com

Once the base installation was complete I exported my current blog from the WordPress.com web site. This is provided as a an XML file. I found an explanation of this on the WordPress.com web site.

This format, which we call WordPress eXtended RSS or WXR, will contain your posts, comments, custom fields, and categories.

I saved the file and then proceeded to import my blog back into my XAMP setup.

Well... I attempted to anyway.

Import blog failed

I checked permissions on the database and the file system and they are fine. I am not sure what to make of this. What do I do now?