WordPress is an awesome content management system that has turned the method of web design industry. Today, 36% of the website’s presence on the internet is operating on WordPress. It is a simple tool to design a website, but without installing WordPress on localhost on your computer, you cannot enjoy all the features of WordPress. Here in this post, we have the steps to install WordPress on localhost using XAMPP.
This is perfect for beginners learning WordPress, developers testing themes or plugins, or bloggers designing sites offline before publishing.
Quick Links
How to Install WordPress on LocalHost?
The process of installing WordPress on the localhost is a pretty simple task. But you cannot directly install WordPress on your computer system, you have to first create the local server environment to install WordPress.
You just have to follow three simple steps to create a local server environment on Windows or macOS and run WordPress just like a live website.
- Create the environment for WordPress
- Download WordPress from its official website link
- Install the setup
These three steps can be easily achieved without any technical knowledge. You just have to follow each step carefully without missing any step if you want to install WordPress without any problem.
Download local server software
To create the WordPress installation environment, you have to first download the local server environment software. You should download the local server software, which can easily run across different operating systems. There are multiple local server software is available in the market, but for this particular topic, we recommend you use software that is written in PHP so you can easily create a downloading environment according to your operating system. You can use the development environment of your choice according to your OS (whether it is Windows, macOS, or Linux).
What is the best localhost server?
Here are some of the most popular local host service providers.
- WAMP (WAMP stands for Windows – MySQL – Apache -PHP)
- MAMP (MAMP Stands for Mac OS X – MySQL – Apache – PHP)
- LAMP (LAMP stands for Linux- MySQL – Apache – PHP)
- XAMPP (XAMPP stands for Cross Platform (all) – MySQL – Apache – PHP)
Note: XAMPP is better than WAMP, MAMP, and LAMP because it’s compatible with all the available operating systems, like Windows, OS-X, and Linux.
WordPress needs PHP, MySQL, and Apache to run. XAMPP provides all three in one simple installer.
Simply go to XAMPP’s official website. Select your operating system and click on the download button.

Create a local server environment
Once you have downloaded the local server software to create the WordPress installation environment, the next step is to run the software on your computer system. By running the software on your system, you will get to know the multiple features of the software and help you in understanding the way of using it.
If you’re planning to install a WordPress site with XAMPP, you only need Apache, MySQL, PHP, and phpMyAdmin.

- You may be presented with a Windows Security Alert at the end of the installation. You need to whitelist the Apache HTTP Server from your Windows Defender Firewall by clicking the Allow access button. Make sure to check the “Private networks, such as my home or work network” option. This is very important. XAMPP won’t work if you don’t check this and click Allow access.
- Some antivirus or firewall programs can cause issues with your XAMPP installation. If that’s the case, it’s suggested that you deactivate them temporarily until XAMPP is installed successfully.
Now open the XAMPP control panel and start the Apache and MySQL server. Without starting both of them, you can’t get access to PHPMyAdmin.
Note: If you get any error, such as “Apache shutdown unexpectedly,” that causes open services.msc look for World Wide Web Publishing Service and disable it

Download WordPress
This is the main step where you have to download the WordPress files on your system from the official website. Y
- Go to the WordPress official website,
- Click on Get WordPress button on the top right side.
- You will be redirected to a new page.
- Now hit the Download WordPress button.
- The download process might take a few moments to begin. You will get a zip file. Unzip the file and copy that for your next use.
Create a Database for WordPress in phpMyAdmin
Now, you need to create a database for your WordPress website to save its data on your system. It is a very important step, so it needs to be completed very carefully. Also, after creating the database, make sure to remember the name of the database file because you need to remember it to access your WordPress data later on.
To create the database, you have to follow the small set of instructions –
- Go to your local disk, where you saved the downloaded XAMPP file.
- Select the htdocs folder and paste the WordPress latest version you copied earlier.
Note: Here, you can either rename WordPress as per your need, such as “zillowtechtest”, or leave it as it is.

- Now, open a new tab on your browser and go to localhost/phpmyadmin
- Click Databases at the top.
- Write the same name you have written on your local disk.
- And finally, click on the Create button. Your database will be created within a few seconds.

Install WordPress
Okay, so you are almost done, just need to perform a few last things before your WordPress installation process will complete. Type localhost/WordPress (name of your WordPress file in the htdocs) on your browser’s address bar and hit enter. Now perform a few more actions to complete the installation.
For me, the URL is localhost/zillowtechtest

The steps you have to perform are going to be
- Select a language and click “Continue”.
- On the next page, you have to enter the database name that you created before.
- You have to provide the username and password as well. (or leave the password blank)

- After submitting this information, you need to run the installation process.
- You have to enter the information, such as title, username, password, and email address, and then start the installation process.

Okay, so after following all seven steps carefully, you will be able to install WordPress on localhost without any difficulty. You have to process every step as it is described above.

If you don’t follow the above instructions carefully, then you might have some problems while setting up WordPress, and you won’t be able to run it smoothly.
Frequently Asked Questions
1. Is installing WordPress on localhost free?
Yes, XAMPP and WordPress are both 100% free.
2. Do I need the internet to run WordPress on localhost?
No. It works offline once installed.
3. What is the default MySQL username and password in XAMPP?
Username: root
Password: (empty)
4. Can I move my localhost WordPress site to live hosting later?
Yes. You can migrate the site using plugins like All-in-One WP Migration or manually.
5. Can I use XAMPP on macOS or Linux?
Yes. XAMPP supports Windows, macOS, and Linux.
6. Why is Apache not starting?
Usually due to port conflict with programs like Skype or VMware. Changing Apache’s listening port fixes it.
