Technology Windows WordPress

How To Run WordPress Locally on Windows Using XAMPP

Disclosure: When you purchase a service or a product through our links, we sometimes earn a commission.
Localhost-XAMPP-wordpress

Do you remember the time when we didn’t have high-speed internet? We had to wait until videos buffer, and it was terrible. However, we didn’t know any better back then, and once we’ve tried high-speed internet, it became hard to imagine our lives without it.

People who create websites on a live server might feel the same after developing a website in a local environment.

For instance, XAMPP offers a completely new level of reliability and is incredibly fast.

However, installing WordPress and XAMPP might turn out to be a tricky task so you may need some help. Therefore, we decided to write this guide that will help you install WordPress locally using XAMPP so that you can have your own reliable testing environment on Windows.

Why Install WordPress Locally?

First, let’s figure out why you should install WordPress locally. This approach offers a number of benefits that make it a perfect choice for developers. Here are the main advantages of this method.

  • Speed and flexibility. Creating a good website from scratch takes a lot of time. When building a website on a live server, you may spend many hours waiting until your website is ready. When installing WordPress locally, you will only need an internet connection to get your website online.
  • Faster development. This approach also enables you to quickly test your themes and plugins, without damaging anything on your live website.
  • Decreased downtime. When having a live website, you cannot make radical changes, such as changing a theme, because it will affect the uptime and reputation of your website. The local installation of WordPress enables you to test everything offline and make changes when you’re sure about the results.

Now let’s consider the installation process in more detail.

  • Download and install XAMPP
    First of all, you should install XAMPP. You can download the Windows installer on Apache Friends. Launch the installer and keep in mind that you might need to disable your antivirus software because it may slow down the installation process.

You will see a list of components that you can install.

There’s no need to install all of them. In fact, you will only need PHPMyAdmin and MySQL.

The installer will also offer you to install Bitnami for XAMPP but you don’t need it to install WordPress and XAMPP.

  • Run the modules and test your server

To use WordPress and XAMPP properly, you need two modules: MySQL and Apache. Open the control panel and start both modules. When you launch them, their names will turn green.

After this, you should make sure that your local server is working. Open your web browser and visit http://localhost/. If everything works well, your XAMPP server is ready. However, you also need to install WordPress.

  1. Add WordPress
    If you have a certain experience in installing WordPress manually, the rest of the process shouldn’t cause any troubles. Start by going to wordpress.org and downloading the latest version. After this, go to the folder that you’ve used when installing XAMPP and look for the htdocs subfolder. In this folder, create a folder for your test website. The name of this folder will also work as a sub-name to access the website. For instance, if the folder is called mywebsite, you’ll access the site by going to http://localhost/mywebsite. Once the folder is ready, extract your .zip file with WordPress into it.
  2. Create a database
    Your WordPress also needs a database. To create a MySQL database, use the XAMPP control panel and launch PHPMyAdmin. Click on the “Databases” tab at the top, enter a name for the database, and click “Create.” You can choose any name you want, but make sure to remember it because you will need it in the next step. Installing WordPress locally is different from installing it on a live server because you don’t have to create a new database user.
  3. Install WordPress locally
    Visit your test website. You should see the regular WordPress installer. Don’t forget that the address is http://localhost/[the name of your folder]. The only step different from the regular installation is about the database. Enter the name of the database that you created in the “Database Name” box. Enter “root” in “Username,” and leave the “Password” box blank.

After this, complete the installation process as if you were installing WordPress on a live web server. Once the whole process is completed, your WordPress should run on the local host perfectly. Now you only need to adjust your website to your needs, choose a theme, and fill it with content. You might want to delegate content creation to professional writers. For example, you can find many experienced writers on Online Writers Rating.

If you want to use WordPress Multisite, you can also configure it for your local host. You might need Multisite if you have several websites that share the same resources. For instance, you might need it if you have a network of allied blogs. WordPress Multisite will help you manage all the websites from the same dashboard. Here’s how to install Multisite locally.

  • Add the multisite feature

First, open wp-config.php and scroll the file until you see the line “That’s all, stop editing! Happy blogging.” Above this line, add this code: define(‘WP_ALLOW_MULTISITE’, true). Save the file and close it.

  1. Set up your network
    Click the “Tools” tab in your WordPress dashboard and go to “Network Setup.” Enter the necessary details and click “Install.” The program will generate a few lines of code that you need to add to your .htaccess and wp-config.php files.
  2. Add sites to the network
    Go to “My Sites” > “Network Admin” > “Sites”> “Add New.” Here you will have to enter the addresses, titles, and emails. After this, click “Add Site.” You can add as many sites as you need.
  3. Add plugins and themes
    You can use Network Admin to install plugins and themes on a multisite. Activate them selectively for certain sites or across the whole network.

Wrapping Up

If you install WordPress and XAMPP locally, you’ll be able to quickly test websites whenever you need. The local installation offers better speed, flexibility, and faster development. In addition, the whole installation process is straightforward and simple.

Even the most experienced developers set up websites locally before making them available online so you will certainly appreciate this approach.

Suggested –

Don't miss out!
Learn How to 10X Your Blog Traffic
Invalid email address
Give it a try. You can unsubscribe at any time.

About the author

Gregory V. Chapman

Gregory is passionate about researching on new technologies in both mobile, web and WordPress. Gregory in love with stories and facts, so Gregory always tries to get the best of both worlds.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.