Having a local version of your blog is really helpful especially if you are working on a theme, playing with some plugins or doing some modifications without having to risk breaking your live blog. Installing a web server on your portable device (usb, ipod, etc) is more convenient because you can take it where ever you go and not only you can use Wordpress but you also use it to test your php/mysql powered sites or web applications. Who doesn’t want a portable journal that is smaller than a Moleskine? Install Apache, php, MySql and all the good stuff

 

  1. Download a copy of XAMPPLITE to make the installation faster, extract the files to your local hard drive then copy all the contents to your USB
  2. Run XAMPP then start Apache and mySQL
  3. To see if your server is working point your browser to http://localhost/ if its working it will tell you duhhh or it will say something like “welcome to XAMPP” or “Its working”

Configuring phpMyAdmin and MySql

  1. Go to your phpMyAdmin, http://localhost/phpmyadmin/ it will show you an error at the bottom of the page…
  2. Yeah that’s an error.

  3. To fix this error all we need to do is give the user “root” a password, you can do that by clicking on “Privileges” then edit
  4. Follow the arrow, duh!

  5. Enter an appropriate password, enable the circle next to ‘Password’, and then click ‘Go’
  6. Now that yo’ve changed the root password, phpMyAdmin no longer has access to MySQL. You get an error if you try do something
  7. SQL Error

  8. Now you need to update phpMyAdmin to use the new password. Edit the file config.inc.php located in phpMyAdmin directory of your localhost document root.
  9. Find this code (I found mine on lines 69 and 70)

    $cfg[’Servers’][$i][’user’] = ‘root’; // user $cfg[’Servers’][$i][’password’] = ”; // password Enter your password between the quotes: $cfg[’Servers’][$i][’user’] = ‘root’; // user $cfg[’Servers’][$i][’password’] = ‘password’; // password Then save. Now you can create your Wordpress database

Creating a database for wordpress

  1. Go to phpMyAdmin or http://localhost/phpmyadmin (location may vary)
  2. Create a database, all you have to do is type in a name then hit ‘ok’ or ‘create’
Installing Wordpress

I think we all know how to this… Just copy your Wordpress directory to you USB, configure the wp-config file with the right stuff and you’ll be all set. If you still don’t know how to do this please visit the Wordpress codex.

Pretty permalinks

We are pretty much done, but if you want pretty permalinks on your USB Wordpress blog even though there is no point of using it . Open the file httpd.conf. which can be found in your \apache\conf\ folder. Search for this line

# LoadModule rewrite_module modules/mod_rewrite.so

I found mine on line 118, uncomment or remove the ‘#’ That’s it, you’re all done!!! Have fun! Take note Make sure the Apache and MySql are running because if they’re disabled http://localhost will show you an error page. You can start Apache and MySql by running XAMPP-control.exe and do not expect to get email notifications This article is a USBified version of Urban Giraffe’s article. The reason I picked XAMPPlite because its smaller than WAMP and don’t complain if it is slow, Dude its on a USB stick!

Somewhat related