Step 1: Download XAMPP and Install it on your Computer.
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.
Link to Download XAMPP https://www.apachefriends.org
Step 2: Run the modules
To install WordPress, you’ll need three specific modules:
Apache (the web server that XAMPP relies on)
MySQL (the database that WordPress uses)
PHP (the programming language that WordPress is built on)
You can start these modules from the XAMPP control panel. The status of each one should turn green once it’s launched.
Then, test to see that the local server is working properly by going to http://localhost in a web browser.
Step 3: Add the WordPress files
Now that you’ve downloaded XAMPP and run the modules, it’s time to install WordPress. To do this, navigate to the official WordPress website and download the latest version of the software by clicking on Get WordPress.
At this point, WordPress will be downloaded to your computer.
Now, on your computer, open the folder where you installed XAMPP. This might be named something like C:/xampp.
Open the folder and locate the htdocs subfolder:
In htdocs, create a new folder for your site. The name of this folder will become the sub-name used to access your site. You might name the folder “mywebsite” if you’re using WordPress localhost as a staging site.
Then, you would access your site by going to http://localhost/mywebsite. When you’ve created the folder, extract the WordPress zip file that you downloaded at the start of this step.
Step 4: Create your database
At this point, you’ve downloaded XAMPP, run the modules, and downloaded WordPress. Now, it’s time to create a MySQL database for your WordPress installation.
First, you’ll need to launch phpMyAdmin from your XAMPP control panel. To do this, click on the Admin button for MySQL.
Inside phpMyAdmin, select the Databases tab.
Then, enter a name for your database and select Create.
Step 5: Complete the WordPress installation
The final step only requires a few tasks to complete the WordPress installation. First, visit your local website, where you should see the normal WordPress installer. You can find your website by typing http://localhost/url into the address bar.
Everything is the same as it would be for any other WordPress site except for the database details. Instead, you’ll need to enter the database details like this:
Database name: name of the database you created in phpMyAdmin (you set this up in Step 4 of this guide)
Username: “root”
Password: leave blank
Complete the rest of the process. Now, you should see a fresh WordPress install running on your localhost.