Running a website or blog on a USB flash drive
Of all the good things we can do with a USB (Universal Serial Bus) flash drive, I think running a website is one of them. This is a perfect solution for web designers who need to cart along a whole bunch of designs to show potential clients.
Most USB drives today carry a large amount of space, and the cost for a 2 Gb drive only sits around $30 these days. You can literally store an infinite amount of data in there without having to worry about lugging along a laptop or cramming your desktop hard drive with more stuff.
There is an open source WAMP (Windows-Apache-MYSQL-PHP) bundle called XAMPP (the X is an acronym for any of 4 operating systems that it can run on) that are able to run most PHP based scripts directly from the bundle’s installation directory.
Just download it as a zip file, and unpack it onto your USB flash drive. In order to run a site, let’s say a WordPress test blog, you need to create a folder with a specific name in the htdocs folder of your XAMPP installation directory.
So, if you named your folder as “testblog” and your flash drive is named as E:\, the path should look like this:
E:\XAMPP\htdocs\testblog
So briefly, the steps to run a WordPress blog on a USB flash drive are just:
- Install XAMPP by unpacking it onto the drive.
- Click on the icon file named “xampp-control”.
- Start Apache and MySQL by clicking “start” for each of them.
- Open a browser window and type in http://localhost/xampp
- You’ll see a splash screen; click on phpMyAdmin and create a new database with your chosen name by entering it into the empty field and clicking on the “create” button.
- Copy all the WordPress files into E:\XAMPP\htdocs\testblog
- Edit the wp-config-sample.php as you would for a self hosted WordPress blog. You may use the username of “root”, and no password is needed, because the user “root” has by default, all privileges, and no password.
- Go to the url http://localhost/testblog and the rest is history.
In all, it should not take more than 5 minutes, as WordPress states. You can use XAMPP to try and install many other scripts like Joomla, Drupal, Moodle…etc, and work on them in your leisure time, right from your very own “mini server”. Although XAMPP turns your little USB drive into a “mini server”, the only one who can access “localhost” is you.
I don’t know about you, but I think it’s pretty cool to be able to run a website from a tiny USB stick.
Popularity: 13% [?]








[...] Modern Street A Blog on and about the Web « Running a website or blog on a USB flash drive [...]
[...] about duplicating or replicating your WordPress blog on a USB flash drive using XAMPP instead of running a fresh WordPress install. Sometimes you may just want to replicate your live blog because you want to test a theme or change [...]
thats frickin insane!
where my usb keydrive when i need it!
imagine that - misplacing your server!
wow, that truly is amazing. I remember being impressed enough at being able to launch my own desktop, open office & firefox from a usb stick, but an apache server, php and a blog?!!
wow again.
That may be the single coolest idea I’ve heard all week! Thanks for the info, I’m going to go download XAMPP right now!
hm, very interesting
‘ll go download
Very cool approach. Considering that a UBS drive would generally outlive a harddrive, I’ll give it a try.
Cool idea. This solution can be use as presentation purpose or even as publication products. for example: USB flash drive with web site inside.
I also like to use my USB drive for other portable applications, like Firefox. It gives you safe and convenient web surfing capabilities from any computer.
Also, I only paid $9.99 for my 4 GB flash drive from Wal-Mart. So, it was definitely worth the buy.
frelly said:
“Very cool approach. Considering that a UBS drive would generally outlive a harddrive, I’ll give it a try.”
It’s been my experience that USB drives DO NOT outlive hard drives. They are static flash memory devices. And over time, they will fail. I guess it depends on how many times you write / re-write to them that makes the difference.
In response to Affordable Custom Web Design - I have several memory sticks which I carry around with me, one has just applications on it. I have portable versions of Firefox, Avast and even Photoshop and Dreamweaver (I believe this isn’t actually illegal providing you have a legitimate copy!)
Having all my apps on one drive is very handy, it means I can leave a stick in the car and have access to my favourite apps on any machine whenever I need them!
Thanks for info!
I think this is a great idea. Portable wordpress is a very clever and techie replacement for a journal or diary.
My one complain is with this statement: “You can literally store an infinite amount of data…”
Literally you can’t store an infinite amount of data on a 2GB drive. Literally there are actual limits, 2GB.
@Jared
Thanks. Yeah, but with most USB drives having 8 GB or more these days, a lot of websites can be stored in there
Customizing your localhost to a flash drive is sweet! It adds flavor to web design. I’ve heard of small OS’s running from the USB port but nothing like this… If a MAC address could be assigned to this device then switches could now access your drive.
Oh man, I’ve been playing with WAMPS in my web development for years, and running demos of all the apps I can hack and themes/templates I can customize from a USB stick on any machine is very impressive to clients. Especially when you explain “It’s my own little web-server - runs from the stick and doesn’t install anything on your machine…” I’ve been asked if they could keep it - and why not? It’s a great way for them to practice using the “back-end” of some app you’re customizing for them.
It’s true the USB sticks are apt to fail after X-number of read/writes (I don’t think anyone really knows), so make sure you back everything up. But that’s as easy as copying the whole XAMPP folder to another drive, and running the little “setup-bat” file to reconfigure the base drive-letter in it’s config path to the new one (or you could do this manually). After that, everything will work exactly the same when you visit “http://localhost/” with your browser.
@ Mark
Yeah, I love using a flash drive whenever I can
useful and greate post thanks