- eJoneClicks.com - http://ejoneclicks.com -

Moving from Blogger and Haloscan to WordPress - Part 2

Posted By eJone On 24th May 2006 @ 00:38 In Click Tips | 3 Comments

In [1] part one, I discussed about the requirements and things you need to consider before taking the plunge. If you’ve pretty much got the general idea and are ready to go ahead, let’s move on.

I have broken down the whole process into six stages:

  1. Preparing your web host and database
  2. Downloading, configuring and uploading WordPress
  3. Exporting all your comments from Haloscan and uploading them
  4. Importing from Blogger
  5. Importing from Haloscan
  6. Tidying up

Don’t worry if anything from the above scares you. I will go through each stage in detail below:

1) Preparing your web host and database
First of all, decide how you want your blog address to appear e.g. www.mydomain.com/blog, www.mydomain.com/wordpress, www.mydomain.com/journal, or just simply www.mydomain.com. The /blog, /wordpress and /journal bits are simply subdirectories on your web host i.e. you will need to create them, whereas just www.mydomain.com simply means WordPress is installed at the top-most-level directory (or root directory). The norm would be www.mydomain.com/wordpress, but again, this is entirely up to you. There is nothing wrong with installing it into the root-level directory, but I personally prefer uploading it to a subdirectory. It’s your call.

Now we come to the database. Before you go any further, decide on a name for your database (i.e. wordpress, wordpress_db, blog, etc.) along with a login and password for it. You’ll need to use your host’s own tools to create and configure your database. This can differ from host to host, but to make things easy, make sure they offer either cPanel or phpMyAdmin. If they have cPanel, hop over to [2] WordPress’ Using cPanel page. If they have phpMyAdmin, hope over to [3] WordPress’ Using phpMyAdmin page. If you went for web hosting on GoDaddy, [4] their Help Center provides a page on setting up a MySQL database.

2) Downloading, configuring and uploading WordPress
Download WordPress from [5] http://wordpress.org/download/ and extract it somewhere where you know where it is (e.g. desktop, my documents, etc.). It will (or should?) create a folder called ‘wordpress‘. Look for a file called wp-config-sample.php, make a duplicate of it and rename it to wp-config.php.

Open this file in your favourite text editor and fill in the following information:
i) DB_NAME - the name you gave to the database in step 1
ii) DB_USER - the username you created in step 1
iii) DB_PASSWORD - the password you chose for the username in step 1
iv) DB_HOST - some hosting providers like GoDaddy runs MySQL on a completely different server. You will need to note the address (i.e. somehost.somedomain.com) as you will need to enter it here. If there are no signs or indication that your database is hosted elsewhere, then it is safe to leave this as ‘localhost‘. Save this file.

The next thing to do is edit is the Blogger import script file. This is a crucial step if you want to import all your comments from Haloscan. If you’re not importing from Haloscan, then you may skip this part. Locate blogger.php (in wordpress/wp-admin/import/) and open it in your favourite text editor again. Look for the following line:

$post_content = $postinfo[2];

and change it to:

$post_content = “<!--” . $postinfo[3] . “-->” . $postinfo[2];

UPDATED 27 May 2006: Do not, I repeat, do not edit the file using Windows WordPad. Doing so will change your file format into rich text, which we really, really want to avoid doing. Please use Notepad instead.

Save this file. Now head over to [6] Justin’s page and download his import-haloscan-script.zip (version 2.0 at the time of writing) which can be located further down the page (in step 3). Extract the file and copy import-haloscan.php to your wordpress/wp-admin/ folder.

UPDATED 25 May 2006: The next stage assumes you’re already familiar with [7] SmartFTP provides a video tutorial on how to do this.

Now you’re ready to upload your WordPress installation files. Depending on what you decided on step 1 and using your FTP client, create a new directory on your web host (if you’re installing WordPress at the root-level directory, then there is no need to create one). Then, upload all the files within the ‘wordpress’ folder (not the folder itself) onto the chosen directory.

Once all the files are uploaded, you will now need to run the installation script. Launch your favourite web browser and enter http://www.mydomain.com/wp-admin/install.php in the address field. If you installed WordPress into a subdirectory, then enter http://www.mydomain.com/subdirectory-name/wp-admin/install.php. Follow the on-screen instructions. If everything goes well, it will tell you that the installation was successful. Note down the automatically generated username and password, you will require this to log into your freshly installed copy of WordPress.

3) Exporting all your comments from Haloscan and uploading them
You will need to log into Haloscan. If you haven’t upgraded to Premium Account yet, you will have to do this now otherwise you can’t export your comments. Click on Manage Comments -> Export. Depending on the number of comments you have, there will be a link for every thousand of them. Click on your first thousand comments link (0-1000) and save it as export1.xml, 1000-2000 as export2.xml and so forth If somebody leaves a comment on your blog after you have done this, it will not get imported, so bear this in mind. Upload all your xml files into your WordPress directory on your web host (e.g. above the wp-admin folder, into /wordpress, /blog or just /).

4) Importing from Blogger
This is the easiest bit. Just log into your WordPress Dashboard with the username and password that was automatically generated in step 2 (if you want to change your admin password now, you may do so by clicking on Users at your WordPress Dashboard). Click on Import -> Blogger and follow the on-screen instructions. While it’s doing this, your blog on Blogger will be temporarily unavailable and it’s crucial that you are logged out of Blogger on your web browser while the importing process is taking place. Just sit back and watch the progress indicator. It will tell you when it’s all done. Visit your WordPress blog in another browser window to confirm the import.

5) Importing from Haloscan
If you’ve followed step 3 to the letter, then this bit should be easy as well. Enter the following address on your browser: http://www.mydomain.com/wp-admin/import-haloscan.php. Again, if you have installed WordPress into a subdirectory, then enter http://www.mydomain.com/subdirectory/wp-admin/import-haloscan.php instead. Follow the on-screen instructions. Confirm the import by visiting your WordPress blog in another browser window.

6) Tidying up
I don’t know about other people, but I find the import to be not entirely perfect. For instance, all my pictures that we centered on Blogger have now shifted to the left. Some of my Quicktime embeds were missing along with my YouTube videos. You will have to manually adjust all of these yourself which can be a huge pain, but hey, it will be worth it.

The next main thing is of course, adding categories to your posts. Again this can be tedious, but you will only have to do it once. Now all you need to do is come up with some category names. :)

If you think that this guide can be further improved or you noticed a mistake somewhere, please by all means let me know. I would welcome any comments.

Article printed from eJoneClicks.com: http://ejoneclicks.com

URL to article: http://ejoneclicks.com/2006/05/24/moving-from-blogger-and-haloscan-to-wordpress-part-2/

URLs in this post:
[1] part one: http://ejoneclicks.com/2006/05/20/moving-from-blogger-and-haloscan-to-wordpress-
20/

[2] WordPress’ Using cPanel page: http://codex.wordpress.org/Using_cPanel
[3] WordPress’ Using phpMyAdmin page: http://codex.wordpress.org/Installing_WordPress#Using_phpMyAdmin
[4] their Help Center provides a page on setting up a MySQL database: http://help.godaddy.com/article.php?article_id=36&topic_id=67&&
[5] http://wordpress.org/download/: http://wordpress.org/download/
[6] Justin’s page: http://justinsomnia.org/2005/06/importing-haloscan-comments-into-wordpress/
[7] SmartFTP provides a video tutorial: http://www.smartftp.com/support/howto/

Click here to print.