Wordpress On A Stick?


I was reading a while back when I noticed one of my RSS feeds lighting up with a topic about putting Wordpress on a USB drive. With the capacity of thumbdrives getting bigger everyday, it is only natural that software developers would start to take advantage of the portability factor. Already, we’ve seen a number of programs configured to be portable and run off portable storage devices. Personally, to date, the best one is Firefox. While some might argue that running an executable off a portable device runs the risk of spreading computer viruses over multiple machines and networks, I say go for it. It was for that reason that I decided to take ‘Wordpress on a stick’ out for a test drive.

Please refer to Tamba2 for a rather straightforward and detailed tutorial on how to put wordpress on a stick.

It was just after lunch on a slow Monday afternoon when I made the decision to try it out. It was one of those ‘eat too full, nothing to do’ moments. I had my one month old portable harddisk and some free time on my hands. Downloading the necessary components was quick and the installation went by without a glitch. It was when I tried to start up Webserver on a stick (WOS) that I hit my first problem.

WOS, if you refer to the site is actually a packaged solution consisting of the Apache 2 webserver, MySQL database server, and PHP 4 and PHP 5. While the MySQL component of the webserver started up without any difficulty, the Apache refused to follow suit. Instead, WOS kept flashing me “Apache is not running” in dangerous red letters, indicating that something was obviously very wrong. Unfortunately, that was all the information it provided. Something was wrong but it could not (or rather, did not) tell me what it was. At first I thought that it was because I had another instance of Apache installed on my harddrive. To be on the safe side, I uninstalled the redundant webserver, MySQL, and PHP from my local harddrive. Unfortunately, that did not solve the problem as WOS continued to flash that angry Apache message.

After 15 minutes of fiddling around with the configuration and settings, I decided to skip the WOS startup and check each individual component manually from the command line to see what was going wrong. Trying to run “Apache.exe” from the command line returned immediate results. The attempt was rejected because Apache was unable to bind port 80. So that’s what was going wrong all this while! It was then that I remembered that I had installed Microsoft’s Internet Information Services 5 on my office machine for testing purposes. It was set to startup as a service automatically, and hence had taken control of port 80. Well, that was easily remedied by modifying Apache’s ‘httpd.conf’ configuration file to use port 8080 instead. With that out of the way, the webserver came up, Wordpress went in, and the rest of the installation went smoothly.

However, when I tried to log into Wordpress’ admin panel, I noticed a second fault to the entire Wordpress on a stick idea. Wordpress’ Dashboard was heavy with RSS feeds and that took a while to load (something like nearly 2 minutes!). On a normal wordpress page, the loading of the RSS feeds was fine because the average webserver sits on a large pipe of bandwidth. But running it off your desktop (and more importantly, your USB drive) was a different story.

To remedy this, I remembered that there was a stripped down version of the Dashboard available from Simple Thoughts and tried it out to see if it did the trick. Unfortunately, it too had some RSS feeds embeded inside that took up resources and was slow to load. Giving up, I restored the old Dashboard and commented out the RSS feed loading functions. To do so, edit Wordpress’ wp-admin/index.php file. Search for lines containing ‘fetch_rss’ and eliminate them with the standard PHP comment ‘//’. Once that was done, the admin page loaded real quick and I was happy.

Just to see how portable the system was, I did some work on the themes, saved it, brought it home, and hooked up my external harddrive to my home machine running Windows XP. The webserver came online without any problems. All the the changes that I had made to wordpress remained intact and I was able to get in and out of the blog without much difficulty, except to allow MySQL and Apache to pass through XP’s built in firewalls (which isn’t really the webserver’s fault).

So my conclussion is that Wordpress on a stick works. Someone asked why the heck would we want a portable webserver when any self respecting developer would already have a webserver setup and remote access to that server. Well, for me, the answer is simple. You DON’T always have remote access to your webserver. You especially DON’T always have shell access to remote servers, especially when you’re behind firewalls. Working offline is also much better than online due to accessiblity problems. Plus when you’re working from different locations, it beats copying the files back and forth. Just plug it in and you’re good to go.

Anyway, for those of you who are interested, just remember to watch out for the following:

  • If your portable webserver refuses to startup, try running it on command line to see what’s the problem. Its most likely the port setting in which case changing Apache’s httpd.conf would solve the problem
  • If the admin page dashboard loads too slowly, edit wp-admin/index.php and comment out lines containing ‘fetch_rss’.

So what do you think? Is it worth the trouble for you?

Related posts:
Wordpress 2.1 - Ella
Boredworkers.com Upgrade
Expanding Wordpress
My Split Personality
Popularity Contest


1 Comment »

  1. Dan Said,

    April 24, 2006 @ 11:13 am

    I found a really good use for this - Meeting Notes

    Check out my post here - WordPress on a Stick for Meeting Notes

RSS feed for comments on this post · TrackBack URI

Leave a Comment