Most of you probably know how to install WordPress on a hosting. And some of you might have WordPress installed on a local server too. But did you know that you can install WordPress on a USB flash drive? Yes, that’s possible. With a few steps, you can create a portable WordPress site on your flash drive.

There are several reasons why you might need a portable WordPress installation. You might need to work on a local development project on several locations. Or maybe you want to distribute copies of a website manually, rather than to publish the website on the internet. For both of these cases, a portable WordPress installation will be very useful.

Install WordPress on a USB Flash Drive

In today’s post, I am going to show you how to install WordPress on a flash drive by using these methods. But first, let’s find out what you need to create a portable WordPress installation.

What Do You Need for Portable WordPress?

You already know that you need a web server for installing WordPress. Specifically, you will need access to PHP and a database management system. These features are included on web hosting packages and dedicated tools like WAMP, XAMPP, MAMP, etc.

But when you want to install WordPress on a flash drive, you need something different. You need to create a virtual server on your flash drive. At the time of writing this post, three tools are available to perform this task–

  1. Portable XAMPP,
  2. UwAmp and
  3. Instant WordPress (InstantWP)

Let’s get started with portable XAMPP first.

#1. Installing WordPress with Portable XAMPP

If you have any experience in installing WordPress on your computer, you are probably familiar with XAMPP. This is one of the most popular local development environments available right now. The regular version of XAMPP is designed to be installed on your computer, not on a flash drive.

Fortunately, there is a portable version of XAMPP which will be useful for us. To download the portable version, go to the Apache Friends download page.

Click on the “More Downloads >>” link. This will take you to a page like the following –

Theme Banner

Download XAMPP Portable

Click on the “XAMPP Windows” directory. This will open a long list of the available versions of XAMPP portable. The numbers on the folders indicate the PHP version included in that edition of XAMPP.

Unless you want a particular PHP version, click on the link on top to download the latest version.

Once the download is finished, double-click on the downloaded file to begin the installation process. During the installing, make sure that you are choosing the flash drive as the destination.

Install XAMPP Portable

Now that you have installed XAMPP, you can have a PHP development environment on any computer. Just plug in the flash drive, fire up XAMPP, run Apache and MySQL, and you are good to go.

To install WordPress, download the latest version from WordPress.org. Extract the archive to your desktop or any other place you want.

Next, make sure that Apache and MySQL are running. Then, open your browser and enter the following address –

http://localhost/phpmyadmin

This will open the database directory. You will need a username and password to log in. Use “root” as the username (without the quotation marks) and leave the password field empty. Create a new database for your WordPress site. Note down the database name. You will need this name when installing WordPress.

Open the installation folder of XAMPP on your flash drive. Look for a folder titled “htdocs“. Copy the extracted WordPress folder into the htdocs directory.

Since you are installing WordPress on a flash drive, you need to increase the max_execution_timeof your PHP development environment. This will take care of the “Request timed out” errors you will face due to the slower read and write speeds of flash drives.

To increase the time, open the php.ini by using a code editor like Notepad++. Find out the max_execution_time and increase it to something bigger like 400 or 600 seconds. Restart Apache and MySQL to apply this new setting.

Xampp PHP Config

At this point, you are ready to begin the WordPress installation process. Enter the following address on your browser –

http://localhost/your-wordpress-folder

Make sure that you have replaced the “your-wordpress-folder” part with the actual folder name. From that part, you will find the usual steps for installing WordPress.

#2. Installing WordPress with UwAmp

UwAmp is another popular choice for installing portable development environments. To download the software, go to the UwAmp website and click on the “Download” link. This will take you to a page where you can download the exe file or a zip or RAR version of the installer.

Download the format you prefer. Once the download is complete, start the installation process. Make sure that you are installing the software on your flash drive.

Install uWamp

Now that you installed UwAmp, it is time to fire up the software. To do that, go to the installation directory and click on the UwAmp.exe file. This will open an interface like the following –

uwamp Interface

At the top, there are two tabs – Server and Status. From the Server section, you can start and stop Apache and MySQL. On the Status section, you can check out the current status of both of these tools. Make sure that both of these are started.

Then, in the “Configuration” section, you can choose different versions of PHP. This would be useful for developers who want to test their digital products on various configurations.

The next two sections are titled “My Web” and “Tools“. On the My Web section, you will find two buttons to open the localhost on your browser and to open the documents directory of your server.

There are four buttons on the “Tools” section. Among them, PHPMyAdmin will be the most useful for you.

Now, let’s install WordPress by using UwAmp.

First of all, we need to increase the value of max_execution_time for this server. To do that, click on the document icon right next to the “PHP Config” button on the “Configuration” section. This will open the PHP configuration file. Find out max_execution_time and change its value to something bigger, like 600 or so.

uwamp PHP Config

Next, make sure that both Apache and MySQL are running. You can start them from the “Server” section on top.

Click the “PHPMyAdmin” button on the “Tools” section. This will take you to the MySQL, database admin. Log in to the admin section by using “root” as both the username and password. Create a database for your WordPress installation.

Next, click the “Folder www” button on the “My Web” section. This will take you to the server directory. Copy the extracted WordPress folder to this directory.

Then, enter the following address in your browser –

http://localhost/your-wordpress-directory/

Don’t forget to replace “your-wordpress-directory” with the actual folder name. The next steps are same as installing WordPress on a web hosting.

#3. Installing WordPress with InstantWP

InstantWP is the last tool which we will use to create a portable WordPress installation. Among all the tools we discussed in this tutorial, this is probably the simplest one. InstantWP allows you to start using WordPress as soon as you installed the software.

To download InstantWP, go to the website and click on the “Download Now” button. This will take you to a page where you will find the download button in a section titled “Current Version.”

Save the file on your computer. Double-click on the downloaded file to start the installation process. Like the other two tools, make sure that you are installing the software on your flash drive.

Install Instantwp

Once the software is installed, go to the installation directory. Double-click the InstantWP.exe file to initiate the software. The software looks like the following –

instantwp Interface

As you can see, there is a WordPress URL. Copy the address and open it in a browser. That’s the WordPress installation you just created.

Back to the InstantWP interface, there are several buttons to take you to different places. By clicking on these buttons, you can visit your WordPress website’s front page, the admin, the themes and plugins folders, the MySQL admin page, and the documentation. For the admin pages, the passwords are displayed too.

It’s true that InstantWP provides a simple solution to use WordPress on a flash drive, but it is using a dated version of WordPress. It uses WordPress version 4.2.10, while the current version is 4.7. Keep this in mind if you are planning to use this tool.

Now Read: 7 Essential Settings After Installing WordPress

Over to You

On some occasions, it would be very useful to have a WordPress site installed on a flash drive. Now that you have read this in-depth tutorial, you know the best tools to do this. If you want my opinion, I will pick UwAmp for its simple interface and the unique ability to use various PHP versions. But if you want all the options of a local server, you have to go for XAMPP.

So, what would be your pick among these three tools? Which tool would you use to install WordPress on a flash drive? Let me know by leaving a comment below. And if you use any other way to create a portable WordPress installation, let me know that too.

How to Install WordPress on a USB Flash Drive?
5 (100%) 8 votes