WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Tutorials» How to Install WordPress On a USB Stick Using XAMPP

How to Install WordPress On a USB Stick Using XAMPP

Last updated on May 22nd, 2014 by Editorial Staff
121 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
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 WordPress.org 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+.

121 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • Revealed: Why Building an Email List is so Important Today (6 Reasons)

    Revealed: Why Building an Email List is so Important Today (6 Reasons)

  • Checklist

    Checklist: 15 Things You MUST DO Before Changing WordPress Themes

  • How to Fix the Error Establishing a Database Connection in WordPress

    How to Fix the Error Establishing a Database Connection in WordPress

  • How to Start Your Own Podcast (Step by Step)

    How to Start Your Own Podcast (Step by Step)

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

20 Comments

Leave a Reply
  1. martine says:
    Nov 27, 2018 at 2:29 am

    Hi,
    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);

    Reply
    • WPBeginner Support says:
      Nov 27, 2018 at 9:06 am

      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.

      Reply
  2. rajendra upadhyaya says:
    Apr 2, 2016 at 12:46 am

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

    Reply
  3. Miran Potocnik says:
    Mar 8, 2016 at 6:20 pm

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

    Reply
  4. Armando says:
    Feb 1, 2016 at 6:38 am

    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!

    Reply
  5. Jay says:
    Jan 13, 2016 at 4:00 pm

    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?

    Reply
  6. Joshua Harman says:
    Aug 29, 2015 at 5:29 am

    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

    Reply
    • brainfreeze says:
      Jan 18, 2017 at 10:42 pm

      hi joshua. i am wondering if you have found a way for Mac? if yes, please share. thanks.

      Reply
  7. Mahendra says:
    Apr 1, 2015 at 1:18 pm

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

    Reply
    • Amonza says:
      May 22, 2015 at 8:24 am

      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.

      Reply
  8. Lisa says:
    Jan 23, 2015 at 4:57 pm

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

    Reply
  9. Ahmad Fahrurroji says:
    Jun 29, 2014 at 8:59 pm

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

    Reply
  10. WPBeginner Staff says:
    Jun 9, 2014 at 8:59 pm

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

    Reply
  11. Ian Delemare says:
    Jun 9, 2014 at 4:03 am

    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?

    Reply
  12. Bill Gibson says:
    Jun 4, 2014 at 4:52 pm

    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.

    Reply
  13. WPBeginner Staff says:
    May 28, 2014 at 7:55 pm

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

    Reply
  14. Zeeshan Asif says:
    May 27, 2014 at 7:36 pm

    What about Mac ???

    Reply
    • WPBeginner Staff says:
      May 27, 2014 at 9:31 pm

      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.

      Reply
      • DigitizedSociety says:
        May 28, 2014 at 4:55 pm

        XAMPP has a mac version.

        Reply
  15. James B. says:
    May 24, 2014 at 8:03 pm

    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.

    Reply

Leave a Reply Cancel 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.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
WPForms Logo
WPForms
Drag & Drop WordPress Form Builder Plugin. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2021 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2021)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2021)
    • SiteGround Reviews from 4464 Users & Our Experts (2021)
    • Bluehost Review from Real Users + Performance Stats (2021)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2021 – Step by Step Guide
Deals & Coupons (view all)
CometChat
CometChat Coupon
Get 30% OFF on CometChat WordPress user chat and conference call plugin.
EWWW Image Optimizer
EWWW Image Optimizer Coupon
Get 15% OFF on EWWW Image Optimizer WordPress plugin for image resizing.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).

Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
  • Growth Fund
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon
  • AIOSEO

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress Security by Sucuri.