jump Index ScientificPsychic.com
Scientific Psychic Expand your mind

How to convert a WordPress Blog to Blosxom

WordPress and Blosxom
NOTE: This web page documents an old technology that is no longer in use.
WordPress is a publishing platform that is very popular for writing blogs and web pages. WordPress consists of many modules coded in PHP that store all the blog data, including posts, pages, links, and categories in a MySQL database. The functionality and flexibility of WordPress is enhanced by a variety of plugins and themes that can change the appearance of a blog.

Blosxom, on the other hand, is a single program coded in Perl that performs the basic blog presentation, but even the most rudimentary functions such as navigating between the posts has to be done through plugins. Blosxom does not require a database. The Blosxom blog posts are created from text files that are kept in a directory and can be updated and modified with conventional text editors. The files are uploaded to the server via FTP. Blosxom also has a static feature to generate HTML web pages that can be uploaded to a host.

Blosxom

Why migrate from WordPress to Blosxom?
This migration may seem like taking a step backwards, but there may be several reasons for doing it, such as:

What you need to know
In order to migrate your WordPress blog, it is important to have a basic knowledge of Perl and you must have Perl installed on your computer to be able to run Perl programs. Your computer should also have a web-server program, such as Apache, if you want to test Blosxom locally. You also have to know how to use basic computer utilities such as gzip or 7-Zip and FTP programs such as FileZilla. Click here for links to these Free Utility Programs. In addition, your WordPress blog must have a plugin to create a copy of the database such as WordPress Database Backup.

Conversion of the WordPress database
The first step for the conversion is to follow the instructions for the WordPress backup plugin to download the backup to your computer. The output of the program will be a gzip file such as:
blog_wp_20090619_676.sql.gz

Uncompact the backup file in an empty working directory and use the procBlogTitles.pl procedure to produce an HTML index file of your blog entries and a directory with the text files corresponding to your WordPress blog. Click here to download procBlogTitles.pl.

You will need to customize the procBlogTitles.pl by specifying the name of your blog and the path of a directory where the Blosxom text files are to be stored.

procBlogTitles.pl
  # URL for WordPress Blog
  $blogurl = "//example.com/blog";  

  # Directory for local storage of Blosxom text files (must end in slash)
  $dir = 'C:/blosxom-txt/';

Run the procBlogTitles.pl from the command line specifying the input and output like:

perl procBlogTitles.pl <blog_wp_20090619_676.sql >blogtitles.html

Setting up Blosxom
You will need to download Blosxom.cgi and three plugins:

In my own installation, I encountered some problems with the paginate plugin, and I had to make some modifications to handle the navigation for the last page and for static generation. My modifications are available here: modified paginate plugin. You still need to download the original paginate package which contains additional HTML forms for customization. One thing that made the conversion of the blog entries easy in my case, was that I had always kept the graphic images in a separate directory that was not part of the blog. Thus, the links to the images in the stories did not have to be modified.

Conclusion
After I had the Blosxom blog running correctly in my home computer, I attempted to upload the working Blosxom blog system to a host, but I ran into several problems. Although I have several hosting accounts, some of them do not support Perl. I found out that the accounts with GoDaddy.com are tailored for blogs with PHP and MySQL. Yahoo! provides support for Perl, but the Perl library does not contain all of the subroutines needed by the plugins. Uploading these subroutines to the host is not sufficient because they cannot be integrated into the system libraries. Also, Yahoo! does not seem to store file names that start with a dot such as are used by the entries_index_tagged plugin.

The biggest problem with the conversion from WordPress to Blosxom is maintaining the original dates. If the entries_index_tagged Plugin does not work because of the missing Perl subroutines for time conversions, everything gets uploaded with a single date, and Blosxom ends up with hundreds of blog entries with the same date. Following any of the permanent links displays all entries with the same date, in essence, all the stories in the blog. I was able to fix the problem with the dates on a Yahoo! server only by incorporating the code from JulianDay.pm, ParseDate.pm and Timezone.pm into the entries_index_tagged plugin. Click here to download the modified entries_index_tagged_AZ. Rename it by removing the _AZ from the name before using it. It took a lot of hacking to get Blosxom to work as required due to the quirks in Perl support and the fact that many of the Blosxom resources are not available in a central archive.

Blosxom may not be dead yet, but there does not seem to be much active development. Rael Dornfest's support website raelity.org was converted into a WordPress blog with only Twitter messages and became inaccessible in 2010. Many links in the Blosxom web site are broken or point to pages that are no longer in Rael's website. A Blosxom support group that was hosted by Yahoo contained only irrelevant spam messages and it was taken down in August of 2009. One site that still has a lot of archived Blosxom resources is The Unofficial Blosxom User Group, but it has not had any activity since July of 2008.

The deficiencies in WordPress have been corrected little-by-little, and it is now a robust platform with wide support. Blosxom is a good generator for static pages that can be uploaded to the host via FTP. Unfortunately, Blosxom is no longer actively maintained, which makes the software obsolete.



© Copyright  - Antonio Zamora