In this post, we will learn Step-by-Step How to configure XAMPP to run multiple WordPress websites
If you are a WordPress Theme/Plugin Developer or provide Professional WordPress support then at times you must have felt the need to run multiple WordPress websites on the same XAMPP installation in Windows 7/8/10.

Table of Contents
How to configure XAMPP to run multiple WordPress websites in Windows 7/8/10
This tutorial is written focusing on you guys in particular who have this technical problem!
What are Virtual Hosts?
When Multiple websites are running on the same Apache web server, they are called Virtual Hosts.
Configuring Virtual Hosts in XAMPP to Run Multiple Websites
In this tutorial we are going to use 2 websites and their local files to explain the procedures.
- www.sarkarijobstoday.com from c:\xampp\htdocs\wpsjt
- www.byteswiki.com from c:\xampp\htdocs\wpbytes
Step 1: Goto C:\xampp\apache\conf\extra\ and open httpd-vhosts.conf file ( i.e.Virtual Hosts Apache configuration file)
Step 2: Uncomment the below line to enable name based virtual hosts on your XAMPP installation.
NameVirtualHosts *:80
Step 3: Now go to the end of the file & add the following 4 lines. These 4 lines allow access to the XAMPP configuration pages (to access phpMyAdmin etc) by using the URL http://localhost
<VirtualHost *>
DocumentRoot “C:\XAMPP\htdocs”
ServerName localhost
</VirtualHost>
Step 4: For each multiple virtual hosts (websites) you need to configure the XAMPP Apache web server, add the below code (using www.sarkarijobstoday.com & www.byteswiki.com as example).
<VirtualHost *>
DocumentRoot “C:\XAMPP\htdocs\wpsjt”
ServerName www.sarkarijobstoday.com
<Directory “C:\xampp\htdocs\wpsjt”>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *>
DocumentRoot “C:\XAMPP\htdocs\wpbytes”
ServerName www.byteswiki.com
<Directory “C:\xampp\htdocs\wpbytes”>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Step 5: Test the Apache configuration by running the httpd.exe process with the –t switch from the c:\xampp\apache\bin directory as seen in the below screenshot.
Step 6: Goto C:\Windows\System32\drivers\etc\ to configure your Windows Hosts File to redirect the traffic from your computer to the local installation of XAMPP rather than to the original website. Open the file and add the following entry:-
127.0.0.1 www.sarkarijobstoday.com
127.0.0.1 www.byteswiki.com
Once you are finished testing then don’t forget to delete the entries from the Windows hosts file to be able to access the live website again.
Good Day!
Also Read
- Discover How To Setup VPN On iPhone For Free
- Yolo Snapchat: Solution To Send Anonymous Message On Snapchat
- How to Turn Off Cortana in Windows 10 (New Method)
- How to Remove Mobile Number from Instagram Account
- What are the Best free VPN for Firestick that really works in 2022 (Updated)
- How Do I Post on Instagram from My Laptop, PC(Desktop) Or Chromebook(1 Awesome Guide)
- Discover How Do You Turn Off Google Assistant? (1 Shockingly Simple Method)