Do we really need an introduction to WordPress? Absolutely not. WordPress is a widely popular, innovative, and rapidly developed content management system used by millions of users worldwide.

It’s beyond doubt that WordPress is by far the most popular CMS in the world, powering over 40% of the world’s total websites. Not only that, most people prefer it to publish content on the web because of its simplicity, plugins for feature extension, free of cost, and eCommerce friendly.

While these being the reason for many favoring WordPress ahead of other content management systems, we must admit that WordPress is not a plugin & play software. One has to learn to use WordPress and master it before establishing a profitable business online.

For beginners, who are trying to set up their site with WordPress, it’s essential to test the site on your local computer before bringing it live. Or you might be a developer trying to create WordPress themes & plugins, then having WordPress installed on your local machine is a must.

Why Use WordPress in a Local Environment?

Working in a local development environment makes everything a lot easier and more satisfying. In the local environment, WordPress is fast, fun to learn, and especially makes it more beginner-friendly. 

To outline some of the advantages of installing WordPress locally are:

  1. Useful when you are out of the internet, especially if you are traveling.
  2. Fast, therefore takes less time to load & less development or learning time.
  3. No need to pay the hosting charge until your site is ready to publish.
  4. It can be useful to test theme or plugin updates.
  5. A place for developers to test WordPress themes and plugins before publishing globally.

Likewise, there are disadvantages of installing WordPress on localhost, but for now, we only want to look ahead to the positive things you can achieve to install WordPress locally. With that belief in mind, let’s proceed to the tutorial part.

This article explains all the steps sequentially on how to install WordPress locally on your PC. Since we will install WordPress locally, we would be using localhost to serve the files of WordPress.

How To Install WordPress Locally on Your PC

You can not install WordPress on your pc like other typical software. Although, you shouldn’t be too soon to consider the installation of WordPress as a difficult task. You need to create an environment to install WordPress on the localhost and act like a WebHost on your system.

We are outlining the significant steps of installing a WordPress on your PC:

  1. Establish an environment (localhost) to install WordPress locally.
  2. Download WordPress from its official website.
  3. Install WordPress on your localhost.

In the following part of this article, we briefly explain all these three steps in more detail. Follow the steps without skipping, and in the end, you will be able to successfully install WordPress on your PC.

1. Set Up an Environment To Install WordPress

First of all, you will need local server software to configure a localhost environment. To create such an environment, we have the tools such as WAMP, XAMPP, MAMP, and many more. Mostly though, people tend to use these three tools for ease of use and efficiency.

In this tutorial, I’m using MAMP because I mainly use it whenever I have anything to test on local WordPress or do any development work.

Note that there is no bound rule to use a particular localhost creation tool. You can start with almost any software that allows you to create an environment for installing WordPress, and you are comfortable with it.

Step 1: Download MAMP

MAMP is a freemium, open-source software and a cross-platform web server solution that provides all the tools needed to run WordPress on a PC for testing or development purposes. You can use this tool to initiate the environment on Windows or Mac operating systems.

Apart from that, I found MAMP more user-friendly than any other local server environment available for PC. If your machine is running Linux OS, you will need to use the XAMPP local server management tool.

To download MAMP visit their official website at this link.

Download MAMP at their official website.

Step 2: Install MAMP on Your PC

Once the download is complete, you will need to install the executable on your machine. While installing, you may notice additional setup options which let you decide whether you want to install the MAMP pro package along with MAMP. (By default, both come in a single package in the executable).

To initiate the installation process click on continue on all the subsequent popups to finally reach the install option. Before installing, you must accept their license.

When it comes to the local host environment, it’s better to keep the program files on your system drive, although having these program files on your secondary drives won’t cause any issues.

After selecting the drive, the installation will start; it should take 2-3 minutes, depending on your system’s ability.

Install MAMP on Your PC

After selecting the drive, the installation will start; it should take 2-3 minutes, depending on your system’s ability.

Step 3: Run the MAMP Application

After installing MAMP on your system, successfully start the application either from your desktop or search for it using the OS search bar if you notice any firewall configuration popup to allow the MAMP application on it.

When MAMP starts, you should see a window like this:

Run the MAMP application.

On the application, click on Start Server; by default, the server will automatically be started as soon as the application starts. If not, initiate the server yourself.

Once the server starts, you will be redirected to a web page on your default browser, which is the MAMP localhost dashboard. The URL should be something like this:


** Remember, this URL will give you a 404 page if your server hasn’t started already.

The dashboard will provide you with technical information such as current PHP configuration; you will have connection parameters to connect your MySQL server.

Welcome to MAMP.

Now that you have all this info with you, you can start the configuration process for setting up your local WordPress site. But before installing WordPress, you have one more step to cover, which is establishing a database.

Step 4: Create a Database

Every WordPress site needs a database. All the website data are saved in this database, and your site heavily relies on it.

Note: If anything goes missing or is accidentally deleted from your database, your WordPress site may suffer damage, and the site will be broken. Since the entities in a database have a relation with each other, any of those entities that are missing from your DB table will result in a malfunction of your WordPress.

To create a database, go to localhost/phpmyadmin on your browser. Click on the newin the left panel, give your database a name (something you can easily remember & naming convention is always a better idea), and then click on create.

Create a database in MAMP.

The name of the database will be required in the future, so it is better to have it in your mind. Once the database is ready, the next step would be installing WordPress on your local server.

2. Install WordPress on Your PC

Now that you have the localhost server and the database ready, you will need to download WordPress from the official website and configure it with MAMP. Follow these steps properly to install WordPress on MAMP localhost.

Step 1: Download WordPress & Unzip

Now download WordPress from this page.

Download WordPress.

Once the download is complete, unzip the downloaded file. Nothing should be changed inside the unzipped directory, or it can damage WordPress.

Step 2: Move Unzipped WordPress Into MAMP’s htdocs Directory

Now you need to open the folder where you have installed MAMP in your system drive. Inside the folder, there should be a subfolder called htdocs. You will need to move the unzipped WordPress folder into this htdocs folder.

Move the unzipped WordPress folder into the htdocs folder.

Now you need to open the folder where you have installed MAMP in your system drive. Inside the folder, there should be a subfolder called htdocs. You will need to move the unzipped WordPress folder into this htdocs folder.

Step 3: Install WordPress in Localhost

To initiate the installation process, type localhost/wordpress on your browser (if you have renamed the folder then replace wordpress with the folder name). Now follow the typical WordPress installation steps you see on the browser screen.

The configuration of WordPress will initiate on this address: http://localhost/wordpress/wp-admin/setup-config.php

The first step is to select your preferred language. Select your language and click on continue.

Install WordPress and select your preferred language.

Then click on the Let’s go button on the following page to continue the installation process.

Welcome to WordPress.

Now the next page will require the database name we configured earlier. You would also need to fill up the username, password, database host, and table prefix. Keep the database host and Table Prefix as they are; however, changing those won’t start a new problem for you.

Add WordPress database.

After filling up the form, click on the submit button to proceed to the next step.

Step 4: [Fix] Error in Establishing a Connection With the Database

Note: If you are getting an error with the message “unable to connect database” or something similar, you double-check the database name. If the database name is okay, it could be the login credentials not matching with the database.

To correct it, go to localhost/phpmyadmin and select your database from the left panel. Then select the privilege tab on the right panel.

Establishing a connection with the database.

Now click on edit privilege of the root user, then click on login information on the next page. Then modify the user name, password according to your need.

Modify the user name, password according to your need.

After finishing, click on go.

When the database connection is established correctly, click on Run The Installation on the next page.

When the database connection is established correctly, click Run The Installation.

Step 5: Provide Admin Information To Complete Installation

The final stage is to provide your website name, admin username, password, and email address. Whether you check search engine visibility or not, it doesn’t matter because you install WordPress locally. It will appear to you as an online website, but others can’t find it on the internet.

Once filled in all the information needed, click on the install WordPress button. You will notice a success notification mentioning successful WordPress installation.

Add admin information to complete the installation.

Wrapping Up

If you follow these steps carefully, there is no chance you will run into trouble during WordPress installation on localhost. Once you install WordPress locally on your machine, you can do pretty much everything possible on a typical WordPress site.

If you know any other way to Install WordPress locally on a PC apart from using XAMPP, WAMP, or MAMP, let us know in the comment. That would be interesting to try to install WordPress locally in another way or with different tools and have fun with WordPress.

We publish such useful tutorials consistently. Keep visiting WP Webify to read more in the coming days.

About the Author

Rupam Krishna Bharali

Blogger and Developer

Rupam Krishna Bharali is a blogger, developer, and article creator. He likes to explore WordPress, SEO techniques, Design and shares them with people in easy to understand language. He has founded two websites and so far. Besides, he likes to make new connections, especially with developers and bloggers around the world.

View All Articles