How to install WordPress in localhost

WordPress in localhost? Yes, that probably the best option for development or testing when you don’t want other people to see what you are doing. Probably it’s the cheapest and the best option to do staging by installing WordPress in localhost if you don’t want to get a staging server or another staging solution.

Here is a video tutorial that Sorin recorded for you:

In this video, Sorin explains how you can install WordPress in localhost using XAMPP.

Let’s do a quick summary of the video.

You have to follow these steps in order to get it installed:

  1. Install XAMPP
  2. Start the server
  3. Download WordPress
  4. Copy the files to ‘htdocs’ folder
  5. Create a new database in localhost
  6. Add all the credentials

Install XAMPP

First of all, you have to download a program called XAMPP. It can be downloaded here.

You have to download it and then install it by following the steps in the installation wizard.

If you want to learn more about XAMPP, you can read more on wikipedia.

Start the server

When you finished instaling XAMPP, you have to click on its icon who should be placed on your Desktop screen. After doing that you should probably see something similar to this:

How to install WordPress in localhost

Then you just press on ‘Start’ buttons next to ‘Apache’ and ‘MySQL’. And that’s it, another step completed for your WordPress installation in localhost.

Download WordPress

This is probably the easiest step, you just have to go the download page on wordpress.org website, you can go there by clicking here. Press the download button and that’s pretty much all.

Copy the files to the ‘htdocs’ folder

If you are using Windows you should be able to find the htdocs folder here:

C:\xampp\htdocs

Or by simply going to your C:\ partition and enter the xampp folder, then you should see htdocs.

That’s the ‘root’ folder for your localhost and it’s where you should see your wordpress folder

For OS X you can find it here:

~/.bitnami/stackman/machines/xampp/volumes/root/htdocs

Now you have two options:

  • You copy the ZIP archive to your htdocs folder
  • You extract it first and copy the WordPress folder to the htdocs

Create a new database in localhost

Now that you have everything installed and the files in the right place is the time to get your hands dirty with some localhost database work.

You have to open your browser and go to http://localhost/phpmyadmin

There you should see something close to the following picture, you have to click on ‘New’ in the left sidebar menu.

how to install wordpress in localhost

Now add your database name for your WordPress installation and set the char-set to collation, it should look something like this:

how to install wordpress in localhost

Add all the credentials

Now that almost everything is set, let’s see what credentials we should add to the WordPress installation wizard in your localhost environment.

Database name: tadamus

Username: root

Password:

Database host: localhost

Table prefix: wp_

Here is a screenshot that shows the data in our case:

how to install wordpress in localhost

That’s it! Your WordPress is now installed in localhost.

Hopefully our tutorial helped you to install a staging WordPress to help you with your development or your testing.

As you probably can see this article is our first tutorial here, you might also want to have a look on our “Hello World” article to see what we are planning to do here and who is behind Tadacademy and Tadamus.