How to Install WordPress on Localhost (5 Easy Steps)
As the most popular web platform, WordPress is already powering up over one-third of the entire websites.
Hundreds of people are entering the community every day. If you too are one of them, we are welcoming you with this easy and beginner-friendly tutorial- “How to Install WordPress on Localhost” in five easy steps.
Learning WordPress is just fun. Nowadays, anyone can build a website for his/her blogging-business or any other purposes within minutes. Yes, CMS (Content Management System) made it such easy for all of us. And WordPress is leading the CMS industry with a surprising market share of more than 60%!
In this post, we have shown how to install WordPress on localhost in 5 easy steps.
- Download XAMPP
- Install & Run the XAMPP on Your PC
- Download WordPress Latest Version
- Create a Database
- Install WordPress on Localhost
Let’s start with this basic question.
Why Install WordPress on Localhost?
A site in a localhost environment is basically for personal purposes, not for users or audience. The only person who can see the site is you! So, why does anyone need to create a site in localhost?
The answer is already given in the above paragraph. Before going live with our site or to make a visual presence, we should learn the basics and test the output of our developed solution. A localhost site lets us check and experience the updates, changes, and settings etc. to be sure about the final outputs.
So, a localhost site actually supports you to prepare for your next final move. Technology is going ahead rapidly so is the software industry. There is no chance to ignore the updating-upgrading process. Here comes the localhost site to the rescue.
How to Install WordPress on Localhost (5 Easy Steps)
WordPress made it easy to install the solution with ease both in a c-panel or localhost. And there is a number of popular solution out there to set up your WordPress on Localhost. To make your job easy, we are mentioning four of the most popular localhost service providers.
In this post, we will show you how to install WordPress on localhost using XAMPP. This localhost server is famous for its overall support and quick response. You can install WordPress using WAMP, LAMP or MAMP, following the same way.
These are the software that creates localhost on your PC by utilizing web server software Apache, PHP and MySQL. You may know-
PHP is a programming language and MySQL is a database management software. Both of them are required to run a WordPress site.
Now, let’s start with the first step.
WordPress Install
Step 1- Download XAMPP
- Simply go to the XAMPP’s official website. Select your operating system and click on download button.
- There are different versions for different operating systems. Choose the perfect one for your device.
After clicking on the download button, wait for a few moments. It’s around 150 MB file, so you should give some time for it to get downloaded.
Step 2- Install & Run the XAMPP on Your PC
This is the second step. After downloading the software, you need to unzip it. When the file is ready, just select the Install button or click on it twice. Soon you will discover that the installation process has begun.
- In the next step, you will see some checkboxes these are already marked. You only need MySQL and phpMyAdmin, so unmark all the others.
- After a few moments, you would see a welcome notice. That means your installation process is working perfectly.
- If you have any antivirus software installed in your PC, you may see a security alert like this. Don’t worry, check any of the given networks and go ahead by clicking on the Allow access button.
- You would see a language selection option, check one that you want and click on the Save button.
- You are almost at the end of the installation process. Just mark this question box and click on Finish button. The XAMPP control panel will automatically run on your device.
Congratulations! You have completed the XAMPP installation process!
Step 2: Start the modules and test your server
To install XAMPP and WordPress properly, you’ll need to run two modules:
- Apache
- MySQL
You can start both modules from the XAMPP control panel:
Once you launch them, you should see their status turn to green:
And now you should be able to test that your local server is working by going to http://localhost/ in your web browser of choice:
If all went well, you now have a functioning XAMPP server on your Windows PC! But now it’s time to install XAMPP and WordPress. So here’s how to get a WordPress site up and running on XAMPP.
Step 3- Download WordPress Latest Version
f you’ve ever manually installed WordPress, the rest of the process should feel pretty familiar. First, you need to go to wordpress.org and download the latest version of WordPress.
Then scroll-down this page and download
Then, in Windows, navigate to the folder where you installed XAMPP. For me, that’s C://xampp. It should be something similar for you. Then, in that folder, find the htdocs subfolder:
- Go to your local disk, where you saved the downloaded XAMPP file.
- Select the htdocs folder.
- In htdocs, create a new folder for your test site.
- This folder name will become the sub-name used to access your site. For example, if you make the folder testsite, you’ll access your site by going to http://localhost/testsite.
- Once you create the folder, extract the WordPress .zip file you downloaded from wordpress.org into it:
Step 4: Create a database for WordPress
Next, you need to create a MySQL database for your WordPress install. To do that, launch PHPMyAdmin from your XAMPP control panel:
Then click on Databases at the top:
And enter a name for your database and click Create. Your name can be anything – just remember it because you’ll need it for the next step:
Unlike installing WordPress on a live web server, when you install XAMPP and WordPress, you don’t need to worry about creating a database user.
Step 5: Install WordPress locally via the on-screen installer
When you visit your test site, you should see the normal WordPress installer. Remember, your test site is just http://localhost/FOLDERNAME:
The only step where this process will differ from a normal install is the database details. When you get to the database details, enter them like this:
- Database Name = Name of the database you created in PHPMyAdmin
- Username = “root”
- Password = leave blank
- This is your final step of installation.
- Give a name to your site. we named our site “My Test Site” here. You can also keep your database name as your site’s name.
- Write your user name
- Give a strong password
- Write your personal e-mail address
- Carefully check the search engine visibility button. Otherwise, Google would start indexing your local site too!
- And, finally click on Install WordPress button!
Yes, you have completed your installation. You should see a notice like below.
Check out the Site You Have Built
This is the time to check out your local site. How would it look like or how would it work? Give a check.
- This is your backend dashboard or admin panel, from where you would control everything.
- And this is your front-end dashboard.
- You can check this by adding a new blog post or installing and activating a plugin/theme etc. We have published a blog post, it looks just like a live site- isn’t it?
So, this was the total process of building a personal testing site on a localhost environment. The process requires 5-10 minutes based on your capability.