WordPress January 26, 2026 3 min read

How to Install Multiple WordPress Sites on XAMPP Localhost (Step-by-Step)

Learn how to set up multiple WordPress websites on Windows using XAMPP. A simple guide to creating databases, configuring files, and running local projects.

A
azzani
24 views
How to Install Multiple WordPress Sites on XAMPP Localhost (Step-by-Step)

Table of Contents

  • Loading table of contents...

How to Run Multiple WordPress Sites on Localhost Using XAMPP

Are you a developer or designer looking to manage multiple WordPress projects on a single computer? Whether you are testing new themes or building separate client sites, XAMPP makes it easy to host multiple distinct WordPress installations on your local machine.

In this guide, we will walk you through the simple process of setting up a second (or third!) WordPress site on your Windows localhost environment.

Prerequisites

  • XAMPP installed and running (Ensure Apache and MySQL are started).

  • Internet connection (to download WordPress).

 

 

 


Step 1: Download WordPress

First, you need the core files.

  1. Go to WordPress.org.

  2. Download the latest version of the WordPress ZIP file.

  3. Keep this file handy; we will need it in Step 3.

Step 2: Create a New Database

Every WordPress installation requires its own unique database.

  1. Open your browser and type localhost/phpmyadmin.

  2. Click on New in the left-hand sidebar.

  3. Create Database: Enter a name for your new database (e.g., wordpress4 or project_two).

  4. Select utf8mb4_general_ci (or the default) for collation and click Create.

  5. Remember this database name!

Step 3: Set Up Your Project Folder

Now, let’s place the files where XAMPP can find them.

  1. Navigate to your XAMPP installation folder (usually C:\xampp).

  2. Open the htdocs folder.

  3. Create a New Folder: Name this folder whatever you want your site URL to be (e.g., if you name it site2, your URL will be localhost/site2).

  4. Extract Files: Copy the WordPress ZIP file you downloaded in Step 1 into this new folder and extract it here. Ensure the WordPress files (like wp-admin, wp-content, etc.) are sitting directly inside your new folder.

Step 4: Configure the Connection

We need to tell WordPress how to talk to the database you created in Step 2.

  1. Inside your new folder, look for the file named wp-config-sample.php.

  2. Open this file using a code editor (like Notepad or VS Code).

  3. Locate the database settings and update them as follows:

    • DB_NAME: Change 'database_name_here' to the name you created in Step 2 (e.g., 'wordpress4').

    • DB_USER: Change 'username_here' to 'root'.

    • DB_PASSWORD: Delete 'password_here' and leave it empty (it should look like '').

  4. Save the file as wp-config.php (remove the "-sample" part of the name).

Step 5: Run the Installation

You are almost done!

  1. Open your web browser.

  2. Type localhost/[your-folder-name] in the address bar (e.g., localhost/site2).

  3. You will see the WordPress welcome screen.

  4. Follow the on-screen prompts (Site Title, Username, Password) to finish the installation.

Success! You now have a fresh WordPress installation running alongside your other local sites. You can repeat these steps as many times as you like to create unlimited local websites.


Watch the full video tutorial here: https://www.youtube.com/watch?v=iC_737YP9jI

Related Articles

Discussion 0

No comments yet. Be the first to start the discussion!

Leave a Comment