I talked about doing it, and even tried out the some of the theory. Eleven months later I did it. This is a reconstruction of the process I went through in migrating from iBlog to WordPress. In the best tradition of reconstructions it is put togther partly from hand-written plus typed notes, old screen captures, lots of coffee, and reliance on memory. Apologies if it seems a bit dis-jointed. I should have gotten to it sooner, but you know how it is…
Update 03.04.09: Migrating from the perpetual iBlog 2 RC? Check out the iBlog Survivors forum, including Jerry’s export script. As icerabbit notes, iBlog 1.x users could also employ this script after importing to iBlog 2.x as an intermediary stage.
Alternative post title: “Crossing to the Server Side”
WordPress.com or WordPress.org?
Having decided on WordPress, the next step is to decide if you want hand-holding (.com) or wish to bring the warp core online and experience the full power of a DIY install (.org). In a nut shell, with a WordPress.com hosted account you get:
- Blog stats (but you can add this functionality to a DIY installation);
- Askimet plug-in activated (but you can activate it for DIY using a free API key.
More important is what you don’t get relative to a DIY installation:
- The ability to import your posts from previous blogging systems;
- The ability to use plug-ins of your choice;
- The ability to edit (and create new) custom themes.
The choice is yours. Sometimes being constrained is a good thing (i.e. you have better things to do than tweak code ’till the early hours); other times it is a bind. If you chose the .com option you’re done reading here. Otherwise, if you dare, read on…
(A) Create a WordPress development environment
- Download and install the MAMP local server environment. MAMP stands for Mac/ Apache/ MySQL/ PHP;
- Follow Doig’s instructions to install WordPress 2 into MAMP/htdocs;
- Create a folder MAMP/htdocs/wp-content/uploads/iblog (we’ll use this soon to store images from our iBlog entries).
Tip: Use http://localhost:8888/MAMP/?language to open the start page if the widget button doesn’t work.
MAMP makes for a great playground in order to experiment with different plug-ins and themes, to learn about PHP, and to tidy up all that invalid markup generated by iBlog.
(B) Export Entries from iBlog 1.4.x
- Download Agitprop;
- Follow the instructions here to export your data from iBlog. Agitprop’s export file is in Movable Type Import Format;
- Rename the exported media folder to “iblog” and move it into htdocs/images/;
- Rename the exported blog entries file to import.txt.
At some point (I regret I can’t recall at which stage, you’ll likely need to update your image URLs using search-and-replace to point to the new server. For example http://homepage.mac.com/your.name/images/mypic.jpg might become http://your.domain.net/wp-content/uploads/iblog/mypic.jpg
(C) Import Entries (Posts) to WordPress
- Go to Dashboard > Import > Movable Type > Choose File and select import.txt;
- Click Import then select user and Submit;
- Wait a while.
(D) Import Haloscan comments
Note that you need to be a premium HaloScan member for this to work (i.e. you paid over $US12).
- Download Justin’s PHP script here;
- Put the script into /Applications/MAMP/htdocs/wordpress/wp-admin/import-haloscan.php;
- Put your Haloscan export file into /Applications/MAMP/htdocs/wordpress/export.xml;
- Inside this XML file is a line of syntax like <thread id=”E880959544″> for each post that has comments—this code is important;
- Edit each post with the following comment, inserted just before the first line of the post (this position is important!):
iDVD 3 does not produce PAL widescreen…
- To get this number mouseover an iBlog post with comments. You’ll see this:
- If you right-click on “Comments” you can copy this URL:
- Paste this into the corresponding WP post (via the web interface or using ecto—see below) and edit the line to:
- Now run the script by adding /wp-admin/import-haloscan.php to the localhost address in your browser;
- Once the import is done you can delete the HaloScan comment from the post, but this is optional as it does no harm—unless you import again, in which case you’ll get duplicate comments!
One minor hitch is that your imported comments aren’t registered in the WP count unless you edit them; just clicking “Edit comment” without doing any editing for one comment is enough to register all comments in that post.
(E) Edit imported entries with ecto
- Download ecto;
- Add an account for your WP installation:
- By default ecto will download the 20 most recent entries, but you can increase this number to download all your posts for editing.
I ran into a problem whereby ecto would not upload images; the WP 2.0.1 update fixed this.
(F) Choose a new web host
.Mac doesn’t support PHP, so I had to look elsewhere. DreamHost seemed popular, and proved responsive and accurate in answering my pre-sales questions. Compared to attractions of .Mac DreamHost had a number of additional advantages:
- Cheaper ($US7.95 pm over 2 years vs. $US10.25 pm for .Mac + iLife 06);
- More e-mail accounts (3000 vs. 1);
- More storage (20 GB vs. 1 GB);
- More bandwidth (a minimum 1 TB pm vs. 10 BGB pm)
- A free domain (vs. no domain);
- A Jabber chat server (vs. none).
Like .Mac it also offers WebDAV and web-based e-mail. If you want to sign up (sure you do), then say I sent you by clicking here.
Update 04.08.06: DreamHost proved unreliable; this site has moved hosting to (mt) Media Temple.
Whoever you choose, install PHP, MySQL, and of course WordPress (which I installed into the server’s root directory).
(G) Migrate from MAMP to the outside world
I can barely read my chicken-scrawl here, but for DreamHost you can follow these instructions to make a dump of your current (MAMP) database and restore it on DreamHost’s servers.
- I seem to recall it was easy enough to use phpMyAdmin (included with MAMP) to export the database (my export was named wordpress.sql). I used Transmit, an FTP client, to upload this file to the root directory of my DreamHost account:
- It’s important that you create a new WordPress database on the live server (DreamHost made this bit easy) before you try importing anything into it. Go figure;
- I then used Terminal to log on to my server. The syntax goes like this:
- Enter your password when prompted and (at least in my case) you should arrive at the [temple]$ prompt;
- To import the old MySQL database containing your WordPress posts etc., use this syntax:
mysql -h mysql.example.com -u username -ppassword newdbname < wordpress.sql
(H)ope it worked!
There’s lots to play with now. But beware of developing a medical condition I’ve named “coder’s elbow”:
This is an inflammatory dermatitis induced by prolonged contact between the skin of your elbows and your desktop.