XAMPP is used by many WordPress developers to set up a local WordPress site as a testing environment. If you are one of these developers, you may find yourself in a situation where you need to run multiple websites instead of just one with the same XAMPP installation. In this post, I’ll walk you through the steps of creating two local websites.
These are the steps you need to follow in order to set up multiple WordPress sites on your local machine.
1. Inside the
htdocs/ of your XAMPP installation directory, create two folders
2. Extract all WordPress files in each of the above folders
3. Go to http://localhost/phpmyadmin/ and create two databases:
4. Inside the
site_1/ folder, open the corresponding
wp_config.php, add the database name, and save the file
/** Database name */ define( 'DB_NAME', 'site1_db' ); /** Database username */ define( 'DB_USER', 'root' ); /** Database password */ define( 'DB_PASSWORD', 'password' );
5. Do the same for
6. Finally, visit
http://localhost/site_2/ to view your sites
You can now set up as many sites as you want using the same process.