In this tutorial, we will learn How to Create a Local WordPress Site Using XAMPP. Installing WordPress in localhost help you to test your plugins, themes before making it live to your live server. In this tutorial, we are going to use XAMPP software to install the WordPress on the local server.
So, What is XAMPP?
XAMPP is the most popular PHP development environment. XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl. The XAMPP open source package has been set up to be incredibly easy to install and to use.
What do we need?
- XAMPP Software: Download from here
- Browser (Google or Mozilla Firefox)
1. Download XAMPP Software from given link and install it.
2. Install WordPress toolkit from Worpdress.org and install it. Now extract the WordPress and open your WordPress folder and move it to XAMPP directory.
- On Windows, it would be C:/Program Files/XAMPP/htdocs or C:\Xampp\htdocs folder.
- On Mac, it will be /Applications/XAMPP/htdocs folder.
3. Now open your XAMPP Control panel and fire up (Start) Apache server and Mysql
4. Go to your browser (Google or Mozilla Firefox) and enter localhost in the search bar and add localhost/WordPress to open the setup.
A first setup page will appear, select language
Now you need to setup wp-admin/setup-config.php. For that enter localhost/phpmyadmin and create a new database with any username. In our case, we have used eera.in and let’s go back to wp-admin/setup-config.php and click on let’s go!
5. Now enter your database name (that we used earlier eera.in) and username as root and leave password as blank. and data host as localhost and submit and run the installation.
6. A welcome install.php will appear. Now enter your site title, username, and password, email and search visibility option and install WordPress. Now, enter username and password and login.
7. Now your WordPress is live on your localhost. That’s all.
A common error in Mysql and how to solve it:
Q: XAMPP Mysql is not working?
Answer: Just change the port. Click Config of MySQL > my.ini edit this file and change the port from 3306 to 3307 and save. Now go to config > service and port setting > Select MySQL and change the main port from 3306 to 3307 and Restart XAMPP
Creating a localhost WordPress will really help you if you want to experiment and learn WordPress in Windows. You can also use WAMP to install WordPress on localhost.
If you are facing any problem, please mention in your comment section.