I finally bit the bullet and have now migrated my site from b2evolution to WordPress. The b2evolution user interface was far too cumbersome, especially in terms of adding diagrams to my posts. In WordPress it is just a matter of drag and drop or browse and upload all from within the edit window. As far as the migration of the posts goes, I could not find easy way to automate the import of the b2evolution data and since I only have 29 posts, I just manually copied and pasted the entries, resetting the dates so that they would appear in the proper chronological order. All diagrams were on my hard drive so adding them back into the posts was easy. The whole process took maybe 3 hours.
The bare-bones WP installation normally just allows for a single blog within its base installation. To get multiple independent blogs, you need to either install WP multiple times or enable networking. This brought up the following problem, since I had decided to configure networking and I installed WP in a sub-directory (two important decisions when setting up a site)….
Say you have two blogging sites, Bobs_Blog and Alices_Blog on your main site www.mainsite.com/blogs. These blogs will be reachable over the following URLs (assuming WP was installed in the blogs sub-directory):
http://www.mainsite.com/blogs/Bobs_Blog/
and
http://www.mainsite.com/blogs/Alices_Blog/
The two sub-directories, /Bobs_Blog and /Alices_Blog do not really exist and are just used as variables for the php scripts in WP to be able to build the web pages dynamically. So if you now try and point some sub-domains in DNS to these paths, the web browser will not find the directory and fail. If you add the directories manually, the browser will not be able to find a home or index file (since there really isn’t one) and give you an error. For example… if you configure http://bob.mainsite.com to point to www.mainsite.com/blogs/Bobs_Blog/, this will not work. The server will try and find the Bobs_Blog directory and will fail.
The prescribed solution to this problem is to install MU Domain Mapper plugin and use that to redirect the http requests to the correct location. Unfortunately the MU Domain Mapper plugin only works if WP is installed in the root directory!
A second idea was to just ask my DNS hosting provider to map a CNAME to the path … for example:
bob.mainsite.com IN CNAME www.mainsite.com/blogs/Bobs_Blog/
Unfortunately, this is not a valid DNS entry 🙁
So the idea I had was to add an index file to the sub-directory which would only redirect the http request to the real site. Based on our example, the index file would have the following php code (taken from http://www.cyberciti.biz/faq/php-redirect/ )…
<?php
/* Redirect browser */
header(“Location: http://www.mainsite.com/blogs/Bobs_Blog/”);
/* Make sure that code below does not get executed when we redirect. */
exit;
?>
When I added a sub-directory called blogs/Bobs_Blog and included this file, I ran into the problem that it created a redirect loop and generated yet another browser error.
The final solution was to create a new independant directory and add the redirect file there. Then point the DNS sub-domain to this directory and voila… it worked! The final configuration has http://bob.mainsite.com pointing to www.mainsite.com/blogs/Bobs_Blog_redir/and the sub-directory Bobs_Blog_redir contains an index.php file with the code shown above. One Caveat… once you connect to the site, the real URL then appears (www.mainsite.com/blogs/Bobs_Blog) and is used throughout. For me this is not a problem, my goal was to have a simple URL for people to use (and remember). Once in the site, everything is automated anyway.