Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

How to Install WordPress On a USB Stick Using XAMPP

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How to Install WordPress On a USB Stick Using XAMPP

Earlier we showed you how to install WordPress on Windows and Mac. However recently one of our users asked if it was possible to use the same local WordPress install both at work and at home. In this article, we will show you how to install WordPress on a USB stick using XAMPP, so you can use your local WordPress install on any computer that you like.

XAMPP is a software package containing Apache web server, PHP, MySQL, and phpMyAdmin. You can install it on your Windows, Linux, or Mac operating systems. In this article we will be showing you how to install it on a USB drive connected to a Windows PC, but the installation method are pretty much the same no matter where you install it.

First thing you need to do is download XAMPP lite. Go to the XAMPP download page, and then click on More downloads.

XAMPP download page

You will be redirected to sourceforge website where you need to first click on XAMPP for Windows, and then click on the latest version.

On the next screen, there will be a list of files available for that version. Scroll down and find the portable version in .exe format. Click on the file name to begin the download.

XAMPP portable version

Once you have downloaded the XAMPP portable file, you need to double click on the file to run the installation. During the installation you will be asked to select the location where you want to install XAMPP. You need to click on the folder icon, and then select your USB drive.

Select your USB drive as the install destination

Click on next to continue the installation. The installer will now install XAMPP on your USB drive. After the installation, you need to go to your USB drive and then open the XAMPP folder.

To launch XAMPP, you need to run xampp-control.exe from your USB drive. This will bring up the XAMPP Control Center which looks like this:

XAMPP Control Center

You need to start Apache web server and MySQL by clicking on the start button next to them. You will be prompted by Windows Firewall, and you need to allow access to both applications.

Now open a web browser and type http://localhost/ in the address bar. You will be greeted by the XAMPP splash screen. This means you have successfully installed XAMPP on your USB drive.

XAMPP successfully installed on a USB drive

Installing WordPress on USB Stick

So far, you have successfully installed Apache web server with MySQL and PHP on your USB stick. The next step is to install WordPress itself. The installation of WordPress in USB stick is not much different than installing it on your Windows or Mac computer.

First you need to open your USB drive and go to the htdocs folder in your XAMPP installation directory. Create a new folder in the htdocs. This folder will be your local WordPress site. You can name it anything that you like. For the sake of this tutorial lets name it site1.

WordPress needs a MySQL database to run, so you need to create a database before installation. To create one, you need to open web browser and enter http://localhost/phpmyadmin in the address bar. This will open phpMyAdmin which is a web based database management software. Click on the Databases on the top menu bar, and then provide a name for your database before hitting the Create button.

Creating database using phpMyAdmin

Now we need WordPress. Simply visit and download a fresh copy of WordPress to your computer. Extract the downloaded .zip file to your Desktop and open it.

Now you need to copy the contents of wordpress folder and paste it in the /htdocs/site1 folder on your USB drive.

Copy paste WordPress files to your USB drive

Once you have copied WordPress files, you can run the WordPress installation by accessing your site at http://localhost/site1 in a web browser.

WordPress will inform you that it didn’t find the WordPress configuration file, so you need to create one by clicking on the Create a Configuration File button.

WordPress installation: creating a configuration file

On the next screen, provide the database name you created earlier. In the username field you need to enter root, and leave the password field blank. Hit the submit button to proceed.

Enter your database details

WordPress will now try to connect to your database. Upon success, it will show you a success message. Click on the Run Install button to proceed.

Provide your site information

You will be asked to provide your site information and create an admin username and password. This admin username and password will be used to login to the WordPress admin area. You will also need to provide an email address. In the privacy section you can uncheck the box that says Allow search engines to index this site. Once you are done, hit the Install button at the bottom.

That’s all, you have successfully installed WordPress. You can now proceed to login to your site and do whatever you want. To create another WordPress site on the same USB, simply create another folder in the htdocs directory and repeat the process.

We hope this article helped you install WordPress on a USB stick. You can now take this USB stick with you. Note that your USB stick will only work with Windows computers.

If you liked this article, then subscribe to our YouTube Channel for our WordPress video tutorials. You can also find us on Twitter and Google+.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. rajendra upadhyaya says:

    is there any way to install wordpress on usb with WAMP and how much memory it uses

  2. Miran Potocnik says:

    We use WP on server. If I install Apache web server with MySQL and PHP on my USB stick and copy the contents of wordpress folder from server and paste it in the /htdocs/site1 folder on my USB drive. Does it mean that the web pages will be the same? How I can synchronize them?for example: If I change something WP on server side that will be changed on local side, when network be up.

  3. Armando says:

    I used (Microsoft) DISKPART in order to change my USB stick into a bootable disk (FAT32) to be used with XAMPP. Before, it would not install.
    You may want to add this tip to the tutorials.
    Thanks for your tutorial and best regards!

  4. Jay says:

    I’m not sure these steps still work – I have done the process before (year or so ago) and it worked. Now doing it again on a new drive, and with all updated components, step two of the wordpress installation is always (almost) blank. So something is going wrong. I have tried twice and same thing.

    Any tips, based on updated components?

  5. Joshua Harman says:

    Is there any way you’d e willing to do this tutorial for Mac? I’ve been wracking my brain for hours trying to get it to work but don’t have a ton of experience

  6. Mahendra says:

    can we run php file in another computer which does not have xampp using usb sticks

    • Amonza says:

      I am not quite exactly sure what you are asking, but if you have xampp installed on a usb stick as described you should be able to take that stick to any computer and run the apache server and be able to serve php pages from the htdocs folder on the pen drive.
      If you are running an IDE that needs the path to php.exe you could point it to the php folder on the pen drive.

  7. Lisa says:

    For those who have done this, what size USB drive do you suggest?

  8. Ahmad Fahrurroji says:

    Good idea, I’ve never used this option installing xampp on usb stick but It’s good to try. Thanks.

  9. WPBeginner Staff says:

    you can transfer your site using BackupBuddy (here is a tutorial) or using Duplicator.

  10. Ian Delemare says:

    I like the idea of having a portable version of WordPress and being able to develop a site in many locations. But what is the procedure to transfer a developed site (including images, posts plugins etc) from a USB stick to the web?

  11. Bill Gibson says:

    I had put a multisite version of WP on a USB stick a couple of years ago. I added a portable version of Firefox, and included the Mobile Barcoder plugin. The multiple sites could be used for classes, projects or presentations, and it was a nice organizational tool. Add text, links & images, and embed for videos or larger files. As long as you put your USB stick in an Internet connected device, you had a great presentation tool. The “Mobile Barcoder” app created QR codes, on the fly, so I could pull up a site from the Flash drive, and then generate a QR code to share links with the audience.

  12. WPBeginner Staff says:

    Yes there is, but we are not sure whether it works as a portable app or not

  13. Zeeshan Asif says:

    What about Mac ???

    • WPBeginner Staff says:

      Unfortunately MAMP the mac alternative to XAMPP can not be run from an external drive. There is an alternative called AMPPS but we have not tried it.

  14. James B. says:

    Great post. I’ve been using “Instant WP” for my local and USB stick installs of WordPress…but I may try XAMPP out! Thanks for the great work.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.