Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
25 Million+
Websites using our plugins
Years of WordPress experience
WordPress tutorials
by experts

How to Install WordPress On a USB Stick Using XAMPP

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

We’ve 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. We’ll 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.

The 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. You may also want to see our guide on how to use WordPress in your browser with WordPress Playground or our expert picks of the best drag and drop WordPress page builders.

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

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

21 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. martine says

    Installed all in good order. When trying to login into wordpress I get the following error : One or more database tables are unavailable. The database may need to be repaired.
    Clicking on the link for repair I get the below and I have to delete the last line referring to the repair. If I do this I get another pop up saying I need to add it again and try again. It is a continious circle with no end.

    How to solve this?

    The wp_users table is okay.

    The wp_usermeta table is okay.

    The wp_posts table is okay.

    The wp_comments table is okay.

    The wp_links table is okay.

    The wp_options table is okay.

    The wp_postmeta table is okay.

    The wp_terms table is okay.

    The wp_term_taxonomy table is okay.

    The wp_term_relationships table is okay.

    The wp_termmeta table is okay.

    The wp_commentmeta table is okay.

    Repairs complete. Please remove the following line from wp-config.php to prevent this page from being used by unauthorized users.

    define(‘WP_ALLOW_REPAIR’, true);

    • WPBeginner Support says

      Hi Martine,

      If this is a fresh WordPress install and you don’t have any content, then you may want to resinatll WordPress. If it does have content, then you may need to repair tables from PhpMyAdmin.


  3. rajendra upadhyaya says

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

  4. 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.

  5. 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!

  6. 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?

  7. 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

    • 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.

  8. 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?

  9. 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.

  10. 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.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.