How to install WordPress on Localhost

Today we will learn how to install WordPress on Localhost, without wasting any time we will learn it by following some important steps.

First Step: Download XAMPP

Follow the first step when you start install wordpress on localhost, first of all, you have to download XAMPP software, which you can download from the Apache Friends website.

Download Xammp - How to install WordPress on Localhost

Select the version that matches your operating system. If your operating system is Windows then select Windows Option, if Linux or OS X choose these.

After downloading, you will have to launch the XAMPP software file, if you have downloaded any antivirus program then you may see a warning, you can ignore it.

You may also get a warning about UAC (User Account Control ). In most cases, you should simply continue with that signal and any other signals that come up.

Now you will see the installer screen. Here, click next.

Xammp Installer Popup - install WordPress on Localhost

Now select which components you need to run. It is important to understand that you do not need all the components for WP. Instead, you’ll require phpMyAdmin and MySQL.

Please select the folder where you want to install XAMPP and choose your language.

Installation Folder Popup in Xammp
WelCome To Xammp Popup

When this is finished, you can open the control panel and begin working with XAMPP.

Second Step: Run the modules

To install XAMPP and WordPress, you will need 3 Important modules:

  1. MySQL (this is the database that WordPress uses)
  2. PHP (this is the programming language that WordPress is built on)
  3. Apache (this is the web server that XAMPP depends on)

Now You should start all these three modules from the XAMPP control panel. The status of each one should turn a green flag once it is started.

Xampp Control Panel

Now you have to check that the local server is working properly by going to https://localhost in the web browser, you will see something like the image shown below.

Successfully installed XAMPP on this system

Third Step: Add the WordPress files

Now that we have successfully installed XAMPP and run the module, it is time to install WordPress. To do this we have to go to the official website of WordPress. Make sure you visit WordPress.org. Click on the download button for WordPress.

Wordpress Install Web Dasboard

At this moment, WordPress will download to your system.

Now, on your system, go to the folder where you set up XAMPP. This is like C://xampp. 

Open the folder and find out the htdocs sub-folder:

htdocs File in Xammp

Create a new folder for your site In htdocs. The name of this folder will be used as the sub-name. used to access your site. You might name the folder “Demosite” if you are using WordPress localhost as a staging site. 

Then, you can access your site by going to http://localhost/Demosite. When you have created the folder, extract the WordPress.zip file that you downloaded at the start of this step.

Step 4: Create Your database

At this moment, you have downloaded XAMPP, run the modules, and Install WordPress. Now, it is time to create and setup a MySQL database for your WordPress installation. 

Now First of all, you will need to launch phpMyAdmin from your XAMPP control panel. To do this we need, to click on the Admin button for MySQL.

Setup MYSQL

In phpMyAdmin, select the Databases tab.

PHPMyAdmin Dashboard

This time, enter a name for your database and select Create.

That is it! we can now Shift on to the Final step.

Fifth Step: Complete the WordPress installation

The final step only requires a little work to complete the WP installation. First, visit your local website to view the normal WP installer. You can find your website by typing localhost/URL into the search engine address bar. 

every single thing is the same as it would be for any other WP site except for the database details. Instead, you will need to enter the database information like this:

Database name: name of the database you created in phpMyAdmin (you remember we set this up in the Fourth Step of this guide)

Login UserName: “root

Login PassWord: leave blank

Complete the rest of the process. Now, you should see a fresh WP install running on your local host and that’s how you can easily install wordpress on localhost in easiest 5 steps only.