Have you ever wanted to have a WordPress installation on your desktop to test any new themes or plugins? Have you ever wanted to give a local site to a client of yours to allow them to get accustomed with WordPress without worrying about the safety of the real website? If the answer to any of the questions above is a YES, then you’ve just come to the right place! This tutorial will guide you through the process of installing WordPress locally on your computer or a customer’s computer step-by-step using XAMPP. Please make sure you read the whole guide, as we’ve also decided to include an easier workaround to this problem for our most loyal and patient readers which you will definitely love. You don’t want to miss this, do you?


Why should you want to install WordPress locally?

First of all, let’s set straight why you shouldn’t want to install your WordPress site on your computer. The reason is pretty simple; running a WordPress site on your computer means that your computer would have to be on 24/7. Otherwise, you would be risking service interruptions and site downtimes. To put it simply, you should use a local WordPress installation only for testing and development purposes.
Now you know why you shouldn’t use your computer to host a WordPress site all the time, let’s see what some reasons using your desktop to maintain a local installation of WordPress are:

  • It’s cheap! You don’t have to buy a domain name or a hosting plan to host your website yet. You will have to do so, however, when your site is ready to be public.
  • You might want to test a theme, a plugin or any other changes to your website before delivering the new version of your site to your visitors.
  • You can create a test site (i.e. a review copy) of your site to a client of yours to let them know how to use your site, without messing with the real one. Believe us, having a newbie client messing around with themes, plugins, widgets, and posts could result in a great waste of your time and effort.
  • If you are creating a demonstration video or a review, about a theme or a product, a local installation of WordPress is much faster than relying on your internet connection to load pages, posts, etc.
  • It’s portable. You can fully customize your website, without having an Internet connection. When your site is 100% ready, you can upload it to your server using an FTP client. (For more information on this subject, you can read our guide on how to install a new theme on WordPress. It contains all the steps you need to follow to use an FTP client. Here’s your link: https://siliconthemes.com/how-to-install-new-wordpress-theme-on-your-wordpress-site/)

What is XAMPP? Why do I need it to run my WordPress locally?

Any WordPress site needs a server to host it, doesn’t it? So, what if you want to run WordPress locally without having a server? The solution is XAMPP. XAMPP is a desktop-based server that can be used to emulate any action of a real server. This is not a scientific description it would suffice for now, however. Just think of XAMPP as tricking WordPress by making it think it is hosted on a server. Cool, isn’t it?
To download and install XAMPP visit the following link: https://www.apachefriends.org/index.html and download the relevant file depending on your OS. For the rest of this guide, we will presume that you use MS Windows. The same will apply if you use any other operating system, however.
After the download process is complete, just double-click the XAMPP control panel window and make sure that the Apache and MySQL Services are running. Quick tip: On some computers, there might be some problems with ports used by other programs, especially on PC’s using Skype. Please quit any programs that cause interferences and try again starting the above services if such problems occur) .

How to install a fresh WordPress installation on your desktop computer?

Now that you’ve installed and configured XAMPP it’s time to setup your local WordPress site. Let’s examine the process step by step:
Step 1: Visit the official site of the WordPress community. You can find it here: https://wordpress.org/
Step 2: Download the latest version of WordPress. This step might take a while, depending on your internet connection. The downloaded file will be a .zip file, and its size will be around 8 Mbytes.
Step 3: Navigate to the folder in which you have installed XAMPP (usually it’s C:\XAMPP), locate the htdocs folder and create a new folder in it. This will be the folder of your website. Give it a name you can remember e.g. demosite

install wordpress locally

Step 4: Paste the downloaded .zip that contains the WordPress installation in this folder (i.e. demosite) and unzip it. You will now have a new subfolder called WordPress. This folder contains the files of your local WordPress site.

install wordpress using xampp

Step 5: Open a browser window, and type localhost/demosite in the address bar. You will be looking at a screen similar to the following one:

install wordpress on desktop pc

Step 6: Click on the WordPress/ folder. Your screen will look like this:

installing wordpress locally

Step 7: Pick any language you like and click on the “Continue” button.
Step 8: Click on the “Let’s go” button at the following screen.

wordpress pc installation

Step 9: On the screen that loads enter your desired credentials. We suggest only to change the username and passwords. No need to be a security addict here! Your site will run locally, remember? No one else will have access to it except for you. When you’re ready, just leave this window open…DON’T CLICK ON THE SUBMIT BUTTON YET!!!

install WP on your pc

Step 10: Open a new browser window and type localhost in the address bar.
Step 11: Locate the PHPMyAdmin tab at the upper part of your screen.

local_install_wordpress7

Step 12: Create a new database with the exact name you typed in Step 12. Look at the following screenshot if you have any questions on how to do so.

create a new wordpress database

Step 13: Head over to the Privileges submenu and add a new user account as the following image shows.

create a new wordpress database user

Step 14: On the screen that follows, type your username, password, and add localhost as a host. Finally, grant all privileges to the new user account. Consult the following screenshot to make sure you didn’t omit anything. When you’ve done all the necessary typing and selecting, click on the “Go” bottom at the bottom left of your screen. If everything went as it should, a new database user would appear.

grant access to the new wordpress database user
Step 15: Do you remember that we instructed you not to submit your credentials in Step 10? Okay! The time to do so is now! Just return to that open tab, and click Submit. Your next screen should be this one:

wordpress on pc installation start

Just click on the “Run the Install” button. The next screen should be a familiar one.

wordpress on pc is now installed

It’s the default WordPress installation screen. Type your desired website credentials, hit the “Install WordPress” button, and your local WordPress site is up and running. Congratulations! You can now test anything you want on this local WordPress site copy!

BONUS SECTION: How to install WordPress locally easily with just a few clicks

If the above process of installing WordPress locally with XAMPP looks terrifying to you (believe as it is much less complicated nowadays than it used to be), allow us to provide an alternative you’re going to love. You only have to download a program called InstantWP (yes you’ve guessed it right. It install WordPress on your PC, and it does so INSTANTLY!) You can find this little gem here: http://www.instantwp.com/
Oops! Did we forget to mention it is 100% free? You just download the executable file, install it, and you have a brand new, fully functional local WordPress installation you can use right away. Cool, isn’t it?

wordpress_locally
We didn’t know about this wonderful program until we began writing this guide. One thing’s for sure, though; we will be using it a lot from now on. It just simplifies the process of installing WordPress locally a lot. Give it a try. It will take only a minute to setup your site. Also, this program offers a beautiful interface that allows you to manage your site and its files easily.  You just have to click on the “WordPress FrontPage” tab and your site instantly loads. No need to download and configure XAMPP, mess with databases and other elements of the WordPress site. This program does it all for you automatically in a minute’s time.

Final Thoughts

This sums up our guide on how to install WordPress locally. You’ve just learned why you need to have a local WordPress installation for testing and development purposes, and how to do so using XAMPP. Also, if you have been patient enough and read our whole guide, you’ve learned about the InstantWP software that makes the entire process even easier and faster. We believe that we’ve covered everything there is to know about installing WordPress on your desktop computer. If you liked our guide, please share it with your fellow WordPress users.