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 website.

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 5 easy steps.

Learning WordPress is just fun. Nowadays, anyone can build a website for his/her blogging, business, or any other purpose 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 64.2%!

In this post, we have shown how to install WordPress on localhost in 5 easy steps.

  1. Download XAMPP
  2. Install and run the XAMPP on Your PC
  3. Download WordPress Latest Version
  4. Create a Database
  5. Install WordPress on Localhost

We have also added an A-Z video tutorial at the end to make your journey easier! So, nothing to worry about.

Now, 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 audiences. 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 making 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, settings, etc. to be sure about the final outputs.

Basically, developers use these sites to check their works for being sure about the quality and issues on it. But as a user, you too should create and use one or more localhost sites before making any update or adding a new feature.

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 local host site to the rescue.

How to Install WordPress on Localhost with XAMPP (5 Easy Steps)

Prefer to get a video tutorial? Here's the step-by-step WordPress localhost installation process for you-

WordPress made it easy to install the solution with ease both in a cPanel or local host. Most of the famous hosting provider companies offer one-click installation for WordPress. But, you need to depend on a localhost webserver solution to create a database and save your files when you are creating a local site.

And there are a number of popular solutions 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.

  1. WAMP
  2. MAMP
  3. LAMP
  4. XAMPP

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.

Installing each of these software separately is difficult and time-consuming for beginners. That’s why you need to depend on solutions like XAMPP/WAMP/LAMP/MAMP.

XAMPP vs WAMP vs MAMP vs LAMP: Which One is Perfect for Your Device

Among these solutions, XMAPP and WAMP are open-source and provide a free solution.

XAMPP is better than WAMP because it's compatible with all the available operating systems like Windows, OS-X, and Linux. On the other hand, WAMP is limited only to the Windows operating system.


LAMP and MAMP are also open-source-based free localhost solutions and provide good support. But the problem is LAMP stands basically for Linux operating system and MAMP is limited only to Mac operating system.

And there are more localhost platforms like AMPPS.

So, which one is better compared to the others? You could find XAMPP as the best suite for any of the operating systems with its lots of features.

Now, let's start with the first step.

Step 1- Download XAMPP

How to download xampp
  • There are different versions for different operating systems. Choose the perfect one for your device.
Download xampp for windows or mac

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 and 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.

set up xampp
  • In the next step, you will see some checkboxes that are already marked. You only need MySQL and phpMyAdmin, so unmark all the others.
MySQL and phpMyAdmin
  • After a few moments, you would see a welcome notice. That means your installation process is working perfectly.
Welcome to XAMPP
  • If you have any antivirus software installed on 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.
XAMPP security
  • You would see a language selection option, check one that you want and click on the Save button.
Language on xampp
  • 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.
Install XAMPP

Congratulations! You have completed the XAMPP installation process!

Step 3- Download WordPress Latest Version

Now is the time to create a database and start installing WordPress on localhost. To do that, you need to download the latest version of WordPress.

  • Go to the WordPress official website, and click on the Get WordPress button from the top right side. You will be redirected to a new page.
  • Now hit on the Download WordPress button.
A screenshot showing page from where anyone can download latest WordPress version for free

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.

Step 4- Create a Database

To create a database, first, you need to prepare a folder on your PC in which you want to save all the data of your local site.

  • Go to your local disk, where you saved the downloaded XAMPP file.
  • Select the htdocs folder and paste the latest WordPress version you copied earlier.
Htdocs- How to Install WordPress on Localhost

Now, rename the WordPress folder. You can avoid this option if you want to build your site with the name ‘WordPress' itself.

We named the folder here ‘mytest‘. Check the below screenshot. You should remember the name you have selected for your database.

Rename WordPress file on htdocs- How to Install WordPress on Localhost

  • Now, open a new tab on your browser and go to localhost/phpmyadmin
  • Select Database
  • 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.
Database name- How to Install WordPress on Localhost

You have successfully created your localhost database. Now, is the turn to install WordPress on the localhost.

Note: Before going to the final step, you need to start both Apache Web Server and MySQL Database from the Xampp control panel installed on your PC or Mac. Without starting both of them, you can't get access to PHPMyAdmin.

Just go to your app folder. Select the Xampp control panel and click on MySQL and Apache buttons. Have a look at below screenshot.

MySQL Database- How to Install WordPress on Localhost
Activate Apache Web Server and MySQL Database

Step 5- Install WordPress on Localhost

Open a new tab on your browser and write localhost/your given name (‘mytest‘ in our case) and hit on the Enter button. You will see a WordPress setup wizard like below.

  • Select your language and click on continue
WordPress language
  • You will see a welcome notice on behalf of WordPress. In the next step, WordPress will require
  1. A database Name
  2. A user name
  3. A password
  4. And a database host
  • Just click on the “Let's go” button.
WordPress database
  • These are the fields you can see in the below screenshot.
  • Provide your database name, you can write ‘root' as user name, and keep the password option blank- it's better and you would find other fields filled up from earlier.
  • Click on the Submit button.
WordPress settings
  • This is your final step of installation.
  • Give a name to your site. we named our site WordPress ERP here. You can also keep your database name as your site's name.
  1. Write your username
  2. Give a strong password
  3. Write your personal email address
  4. Carefully check the search engine visibility button. Otherwise, Google would start indexing your local site too!
  • And, finally, click on the Install WordPress button!
How to install WordPress on localhost

Yes, you have completed your installation. You should see a notice like below.

How to Install WordPress on Localhost

Check out the Site You Have Built with XAMPP

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.
backend dashboard- How to Install WordPress on Localhost
  • And this is your front-end dashboard.
frontend- How to Install WordPress on Localhost
  • 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?
final output- How to Install WordPress on Localhost

So, this was the total process of building a personal testing site in a local host environment. The process requires 5-10 minutes based on your capability.

Note: There are a lot more new and advanced tools in the market to install WordPress locally. You can even run multiple local sites at once from a single dashboard and switch from one to another with just a click. Let's get introduced to those tools and solutions as well.

Bonus One: How to Install WordPress Locally with AMPPS

AMPPS localhost official website home page overview

Now let us show you a few alternatives to XAMPP to install WordPress locally on your device. Here comes AMPPS.

What is AMPPS?

AMPPS is a free software package that includes all the necessary software required to run WordPress such as PHP, MySQL, and Apache. It offers you an easy and straightforward way to build your WordPress site locally on your computer, instead of using a remote server.

Why is AMPPS better for WordPress localhost installation?

AMPPS is better for WordPress localhost installation because it provides a comprehensive package of Apache, MySQL, PHP, Perl, Python, MongoDB, and Softaculous auto-installer on your desktop.

It is easy to install and offers everything you need for website development.

AMPPS also allows complex functions like backing up a database or your entire website with just one click, and you can upgrade your installations with a click too.

Here's a comparison table between XAMPP and AMPPS:

Operating SystemsWindows, Linux, macOS, SolarisWindows, macOS
ComponentsApache, MySQL, PHP + Perl, FileZilla FTP serverApache, MySQL, PHP
Installation OptionsCustomizable installation processAll components included in the package
Application InstallerManual installation requiredSoftaculous for one-click installation
Popularity & ResourcesEstablished user base, more online resources, and tutorialsComparatively newer

This table provides a quick overview of the differences between XAMPP and AMPPS. You can choose either based on your specific needs and preferences.

How to set up AMPPS to run a WordPress site locally?

Follow the 7 steps below to set up AMPPS and run a WordPress site locally

  • Download AMPPS from the official website
  • Install and run the AMPPS application on your computer
  • Download the latest version of
  • Create a database on phpMyAdmin
  • Get a domain name and add it to AMPPS home
  • Customize and connect the site to the database
  • Finish installing WordPress on your local environment

Bonus Two: How to Install WordPress Locally with Flywheel LocalWP

Flywheel local official website homepage overview

Here comes another tool LocalWP by Flywheel and comparatively the best and easiest one for any device and environment.

What is LocalWP by Flywheel?

Flywheel local is a platform that allows users to install and manage WordPress locally. It provides a local web server solution for creating a development environment on Mac or Windows PCs. Flywheel offers features such as one-click WordPress installation, multiple environments, support for third-party plugins, and additional tools.

Why is Flywheel Local better to install a local WordPress site?

Flywheel is recommended for installing a local WordPress site due to its overall support, additional features, and quick response. It offers a user-friendly interface and simplifies the process of setting up a local environment. Flywheel also provides multiple environments, allowing users to create and manage different development sites easily.

Comparison Table: XAMPP vs AMPPS vs Flywheel Local

FeatureXAMPPAMPPSFlywheel Local
InstallationModerately difficultEasyEasy
Supported DevicesAllAllAll
Storage SpaceAround 1 GBAround 1 GBAround 1 GB
Loading TimeFastCan take a bit longerSuper Fast
Free and Open SourceYesYesYes
SSL CertificateIncludedYesYes
Multiple Site SupportYes (with some tinkering)YesYes
Migration to Live ServerModerately difficultEasyEasy

How to set up a local WordPress site with Flywheel

Follow the below steps to set up a local WordPress site with Flywheel-

Download and Install Flywheel Local

Visit and download the Flywheel Local software based on your operating system (Mac, Windows, or Linux). Install the software on your computer.

Add Site Credentials and Install WordPress

Launch Flywheel Local and choose the “Create a new site” option. Provide a name for your local site and select the preferred environment. Set up a username and password for your WordPress site. Click on the “Add Site” button to initiate the installation process.

Go to the Admin Dashboard and Check Your WordPress Site

Flywheel local dashboard overview.
You can install and run multiple sites with Flywheel

Once the installation is complete, you can access the admin dashboard of your local WordPress site by clicking on the “WP Admin” button in the Flywheel user dashboard. You can also view the frontend of your site by clicking on the “Open site” button.

Start Adding and Checking Content

Your local site is now ready. From your WordPress admin dashboard, you can begin creating and customizing posts, pages, and other content elements. Utilize the Gutenberg editor to compose and format your content. Publish your posts and view them on the front end of your local site.

FAQs on WordPress Localhost Environment

1. What are the advantages of using a local server environment for WordPress development?

There are many advantages, give a check to the below points-

  • Provides a private and secure space for testing-experimenting with WordPress themes, plugins, and customizations.
  • Allows you to troubleshoot and debug any issues before deploying changes to your production site.
  • Enables faster development since you don't have to rely on internet connectivity. Also, can create multiple local installations for different projects. You can learn more from our post.

2. Are there any alternatives to XAMPP, WAMP, MAMP, AMPPS, and Flywheel for setting up a WordPress localhost environment?

Yes, there are alternative options available for setting up your WordPress localhost environment. Some popular alternatives include DesktopServer, Bitnami WordPress Stack, and Vagrant with Varying Vagrant Vagrants (VVV).

3. How can I migrate my locally developed WordPress site to a live server?

You can follow 5 general steps:

  • Export the local site's database using a tool like phpMyAdmin or a plugin like Duplicator
  • Upload the WordPress files from your local environment to the live server using FTP or a file manager
  • Create a new database on the live server and import the database backup
  • Update the database credentials and site URLs in the wp-config.php file of the live server
  • Modify the site's domain settings (if necessary) to point to the live server
  • Test the migrated site thoroughly to ensure all functionality is working smoothly

4. Can I access my WordPress localhost site from other devices on the same network?

Yes, but you need to configure your local server and network settings appropriately to make your localhost site accessible to other devices. This allows you to test your site's responsiveness and functionality on different devices like smartphones and tablets.

Generally, you would need to update the host file on the devices you wish to access the site from, pointing the domain to the IP address of the machine running the local server.

5. What security measures should I take when running a WordPress localhost environment?

WordPress localhost environment is generally secure due to its isolated nature. But of course, there are a few security measures you can implement.

  • Ensure that your local server software ( XAMPP, AMPPS, or Flywheel) is up to date
  • Use strong passwords for your database and local server admin interfaces
  • Consider setting up a firewall to restrict access to your local server from external networks
  • Be cautious when importing plugins or themes from untrusted sources, as they could potentially contain malicious code

6. Is it possible to collaborate with other developers on a WordPress localhost installation?

Yes. You can collaborate with other developers by utilizing version control systems like Git. Just set up a shared repository and work on the same project simultaneously. Each of the team members can collaborate with their own local installations. You can push and pull changes to synchronize your work.

7. Are there any performance differences between running WordPress on a local server versus a live server?

There can be performance differences between running WordPress on a local server versus a live server. Typically, a live server is optimized for performance and can handle higher traffic loads, whereas a local server is optimized for development and testing

Wrapping up on How to Install WordPress on Localhost

As CMS made it easy to build a website for people of any background, you can consider it as fun. Yes, building a website with WordPress is so easy these days. You already know- how to install WordPress on the localhost, so it's your turn to build a site for learning WordPress or checking/testing any plugin/theme/update, etc.

WordPress started its journey just as a blogging platform, but over time it became the most powerful web platform for all sorts of websites. You can easily build an online shop or even a multivendor marketplace completely free of cost!

So, give it a try and let us know in the comment section below if there is any confusion. We are always here to help!

Subscribe to weDevs blog

We send weekly newsletter, no spam for sure

Sakil Adnan
Written by

Sakil Adnan

Sakil Adnan is the Head of Content at weDevs. He is a creative author, editor, content & SEO strategist. Sakil completed his Graduation in Business & Marketing. Passionate about WordPress, Technology, Marketing, History, Religion, and Literature. Enjoys writing and exploring new things beyond regular responsibilities. Believes in teamwork and loves empowering team members.

Have something to say? Cancel Reply

Your email address will not be published.

Table of Contents