Installing XAMPP on USB Flash Drive (Portable Web Server)

In previous post, Iā€™ve shown you how to make the USB flash drive to be a local portable web server with Server2Go.

Now, Iā€™ll show you another alternative to make your USB flash drive to be a portable web server with the more established (and rather widely used) XAMPP.

Before that, let me make a quick comparison on the pros and cons between XAMPP (Portable) and Server2Go. A quick question ā€“ if you want me to decide and can only use one to be my local web server solution, then the quick answer and selection will be ā€¦ XAMPP. By Apache Friends, XAMPP is more established and maintained. XAMPPā€™s website is also more professional while Server2Go frontpage looks kind of amateur. One major put off, at least for me, is that on Server2Goā€™s Features tab, compatible browsers include IE 6 & 7 ā€“ cā€™mon, that was like several years back. Hence, in terms of sustainability and support, Iā€™m now more leaned toward XAMPP.

As the mainĀ objective is to make theĀ USB flash drive to act like a portable web server, Iā€™ll be using the more lightweight version XAMPP Lite ā€“ to be more exact, XAMPP Lite seems to be phased out. Itā€™s now known as XAMPP Portable.

So, letā€™s start to step by step procedure to transform your USB flash drive to a versatile and portable localhost.

First, of course, download XAMPP Portable fromĀ https://www.apachefriends.org/download.html and click on the highlighted ā€œhereā€ link to see all the versions of XAMPP on SourceForge :

XAMPP download page

XAMPP portable download

Download the xampp-portable. Iā€™d prefer to download the .zip file to avoid any issue of downloading/installing .exe.

Unzip the .zip file and youā€™ll have a xampp folder. Copy/upload the entire xampp folder to your USB flash drive (Iā€™m using the 8GB USB2.0 flash drive which is more than adequate to be a local web server).

xampp-control

Double-click xampp-control.exe and start both Apache and MySQL.

usa

apache_mysql

ā€œAllow accessā€ (for Apache and MySQL) if your firewall pops up any message.

apache_allow

mysql_allow

Done. Your local web server is up and running! Just start up your (any) browser and you can access your front page at https://127.0.0.1

xamppfrontpage

xamppindex

The public directory is under htdocs ā€“ the frontpage that is showing up at 127.0.0.1 is the index.php at htdocs directory.

You can upload any .html (HTML5) file there and itā€™ll show at your localhost (127.0.0.1).

So if you compare this setup with Server2Go where you still need to edit the pms_config.ini to prevent shutdown issue and to include the :4001 when accessing localhost, XAMPP is ā€œcleanerā€ and straightforward.

Similar Posts