Wednesday, January 20, 2010

Is That A Webserver In Your Pocket...?

0 comments

I have recently found myself in a position where I needed a way to edit a website/CMS solution when offline. I have a friend who has asked me to lend a hand on designing their new website. So instead of throwing up a half-finished website online and progressively working on it, I needed a way to do testing on the design and the CMS (Content Management System) that they will be using. The people who will in turn be updating the website aren't website designers. So they need a simple means to an attractive solution.

Enter XAMPP. XAMMP makes it extremely easy to setup and use an Apache Webserver and utilize PHP and MySQL features. Therefore simulating a webserver environment. Great idea! Offline testing for a web design. Next project, make it portable.

Again; no worries here, XAMPP has a 'lite' version that makes installation to a USB Flash Drive extremely simple. All you need is a USB Flash Drive (or external hard drive), a computer, and XAMPP lite. For sake of being simple, I downloaded the XAMPP Lite self installer package. Once the download is complete, locate the saved file and double click it.

The XAMPP setup will start. Make sure your flash drive is connected to your computer, and when the XAMPP setup applet starts you'll be prompted to 'Choose A Destination Folder'. Use the 'Browse' button to locate the flash drive's directory you wish to install to.

Then click 'Install'. That's it. After a few minutes, you'll be in business with an offline webserver that you can take with you.

Once you get the XAMPP Webserver setup, I found it handy to setup a shortcut to the 'xampp-control' app on the root directory of my flash drive (i.e.: E:/xammp). Especially since I use my flash drive for other things as well. This keeps me from having to search for the program to start up my webserver when I want to use it.

After installing XAMPP to my flash drive, I was able to test it by first going to: http://localhost/xampp/ which is the XAMPP setup page to use after installing XAMMP. From here you have access to 'phpMyAdmin' to setup the databases that will be used for your CMS.

In my case I wanted to play around with Wordpress. So I downloaded the Wordpress CMS software from: http://wordpress.org/. Once the download is complete, simply unzip the contents of the ZIP file to your XAMPP directory's 'htdocs' file. This will act as your 'WWW" folder. Once unzipped, edit the 'wp-config-sample' file with your MySQL database username and password. Then follow the next couple of prompts to complete the Wordpress setup.

Other Content Management Systems will be setup using the same basic process. Log in to phpMyAdmin and setup a database for your desired CMS, then use that database information for your CMS. Then you can test your site, site theme, and site's functionality without uploading to your webhost.

Please note, there are a handful of programs just like XAMPP out there, XAMPP is the one I choose to use and have become familiar with. Also, it's free! Enjoy!

0 comments: