Installing two or more WordPress websites on your computer comes handy when you work on multiple websites. (example, www.abc.com, and www.xyz.com). Working locally is the best method as you can play around without affecting the live site. I always do this when I have a project at hand. To get started all you need is the following:
You will find XAMPP for Windows, Linux and OS X. Choose the appropriate version based on your operating system. Download and install it on your system. During installation, uncheck the unwanted services. You will only need the Apache, PHPMyAdmin, MySQL, PHP.
- After installation, enable Apache and MYSQL (start the service)
- Navigate to the location where you installed XAMPP. usually, it’s in your C drive > xampp folder. Open the XAMPP folder and open htdocs
- Create a new folder and give it any name. Preferably, the name of the website you will be working on.
- Now go back to the WordPress file that you downloaded and extract it
- Open the folder and copy everything side and paste it in the new folder which you created inside htdocs
- Rename wp-config-sample file to wp-config and open it in code editors like Notepad ++
- Go to the XAMP control panel and click on admin or type localhost/phpmyadmin
- Click on new and give the database a name and click on create. For example db_websitename (here website name will your domain)
- From the top menu click on Privileges–> add user account
- In the username field type user_websitename or anything you like and click on generate the password
- Tick “ “
- copy the username, password and database name somewhere like a notepad
- Now open the wp-config file located inside the htdocs folder
- Replace the database name, database username and password and save the file (remember I had asked you to save it on a notepad in the above step)
- Now open your browser and type http://localhost/foldername i.e the name of the folder you created inside htdocs
- Follow the procedure on the screen and install WordPress
Congratulations! you have successfully installed WordPress on your system. Similarly, repeat the procedure for installing new WordPress site. i.e create a new folder under htdocs, copy the contents from the WordPress folder and paste it here and then follow the same procedure.
Now if you want to move the local site to the server, use the All in one wp migration plugin and transfer it without any hassle. Here is a trick to increase upload limit in All in one wp migration plugin