How To Install WordPress Locally

Install WordPress Locally

A lot of people are starting to get an interest in developing themes and plugins for WordPress, but they do not know how to install WordPress locally. Developing WordPress plugins and themes over a local development environment holds many benefits over developing on a live site on the internet, including the fact that there are no downtime risks involved.

I decided to do a quick tutorial on how to install WordPress locally. This is a popular question asked by many WordPress fans and can be of great assistance when it comes to development, as well as testing various features, elements, plugins and themes without risking your live WordPress website.

Requirements To Install WordPress Locally

To install and use WordPress on your local computer without having to upload anything to your web hosting server, you need to meet a couple of requirements. Don’t worry, these requirements won’t take up much of your time and their very easy to get. It is important that you meet these requirements before you install WordPress locally though.

  1. Operating System

To install WordPress locally, you need to have a computer running one of the main operating systems, like Windows, Mac OSX or a Linux distribution. In this tutorial, I will be covering the installation procedure for Windows OS. I will later to tutorials on doing the same procedure on Mac OSX and Linux-powered computers.

  1. Local Development Server

The next thing you need to have is a local development server installed on your computer. This is free and the download size is under 100MB, so if you’re tight on data, then this shouldn’t take much of a gap out of your data bundle.

A Local development server is a software suite that installs various features on your computer that you usually get with an online web hosting account. These features will then emulate a web hosting server directly on your computer, giving you the ability to run application you’d usually only be able to run on your hosting server, directly on your local computer (even without an active internet connection). The key features installed by a local development server includes an apache (or similar) service, PHP and, of course, MySQL or an alternative database server that allows you to easily store, retrieve and modify data that your web applications will use.

The advantage a local development server have over installing each component individually is the fact that the software comes with everything you need to start local development, pre-packed into one single installation file. After installing, an icon is created in the bottom bar of your Windows operating system you can then control all aspects of your local development server using this icon including start and stop services, modify PHP.ini and other important functions.

I highly recommend using the WAMP software suite. I personally use this local development server software, and it works great. I will also guide you through installing WAMP server in this tutorial, but I will point out alternatives for your convenience.

Installing WAMP Server

To install WAMP Server on your local computer, you simply need to download the installation file and follow its installation process. It’s a quick and easy process, and the installation file is under 100MB.

Simply head over to http://www.wampserver.com/en/ click on the Download option in the main menu, and then download the appropriate installation package for your computer. I recommend downloading one of the first packages that includes the latest version of PHP be sure to download the correct package based on your computer specifications (32-bit or 64-bit).

WAMP Local Development Server Download

Now simply double click the downloaded WAMP Server setup files and follow the installation instructions.

You’ve successfully installed WAMP Server onto your local computer, and you’re now almost ready to install WordPress locally. Just one more requirement left, and then we can start with the installation process.

  1. WordPress

The last thing you need is a copy of the WordPress script on your local computer. This is a simple download that’s under 10MB in size and gives you the complete WordPress package to use on your local development server.

Simpy visit http://wordpress.org and click on the Download WordPress button.

Once you’ve downloaded the WordPress zip file, you’ve completed the steps and you now meet the requirements to install WordPress locally. Next I will start to guide you through how to install WordPress locally in only a few steps.

How To Install WordPress Locally

Now that you meet the requirements, it’s time to learn how to install WordPress locally. This only takes a few minutes of your time, and is very easy to do. I will guide you step-by-step through the process and help you install WordPress locally.

Step 1: Start WAMP Server

The first step to install WordPress locally is to start WAMP Server. You’ve already installed the software and simply need to double click on the new WAMP Server icon on your desktop, or find the software in your start menu and click on it. If you’re using account protection on your Windows computer, you might have to authorize the software for administration rights since the software will start some essential services in the background to load the local development server.

WAMP Icon

After starting WAMP server, give it some time to load. You’ll see a new icon appear in the right side of bottom bar of your desktop (The Windows bar). Wait until the icon turns completely green this means all services have been started. In some rare cases, all services might not start successfully if the icon stays red or only turns orange, it means that not all services have been started and you will not be able to use all of the local development server features. If this is your case, then please visit the WAMP Server forums for support on how to resolve this issue.

WAMP Server Started

Click on the icon once it turns green and the WAMP Server menu will appear. From here, you can modify different settings, and find useful shortcuts to different parts of your new local development server.

WAMP Server Menu

To test WAMP Server, click on the Localhost option. This will open up your default browser and navigate to the Localhost this is the home of your new local development server, and the place where you can monitor the WAMP Server.  You can also navigate to the localhost manually by opening any web browser and typing in http://localhost/ (without the quotes) into the URL bar.

Localhost Homepage

If you see the screen above, then you’ve started WAMP Server and can move on to the next part to install WordPress locally.

Step 2: Extract WordPress

Before you can learn how to install WordPress locally, you need to extract WordPress into a very specific folder on your computer. Once extracted, you will have access to WordPress via localhost on any of your web browsers.

This process is very simple open up the WordPress archive file you downloaded earlier on. If you downloaded a ZIP verion, you can use the built-in archive explorer within Windows. If you downloaded any other version, you will need an archive extraction program such as the FREE 7-Zip program.

Extract the wordpress folder inside this archive to the following directory on your computer: C:\wamp\www (You can also open the WAMP Server menu and click on the www directory option.

Now rename the wordpress folder to something you want it to be named. You can also leave the folder name as is this will simply be the directory of your local WordPress installation.

Step 3: Configure a Database

The next step to install WordPress locally is to create and configure a database. This is an important step as WordPress heavily relies on a database to store, modify and retrieve data.

To setup and configure a database, we will be using a small web-app that came with the WAMP Server installation. The program is called PHPMyAdmin and allows you to create, modify and delete databases, as well as database entries, once connected to a MySQL database server. Luckily you don’t have to manually connect PHPMyAdmin to a MySQL server since WAMP Server did this for you very convenient!

Open up your favorite web browser and navigate to the following URL (or simply click on the link): http://localhost/phpmyadmin

This will open up PHPMyAdmin in your web browser and allow you to work with MySQL without having to know about coding or any advance database techniques.

PHPMyAdmin Dashboard

Create a new user

We first need to create a new user before creating a database. This is an optional step, but I highly recommend NOT using the root user as the root user doesn’t have a password.

To create a new user, simply click on the Users tab. This will bring you to the user management tab for your MySQL Database Server. Here you will see the default users created, which includes any and root. Any isn’t an actual user, but rather refers to all users of the database.

PHPMyAdmin User Management

Simply click on Add User to create your new user. This will bring you to the Add New User page, where you can fill out details such as username and password, and you can set up permissions on this page.

PHPMyAdmin Add New User

Fill in a username and password. At host, you need to click on Local this will automatically fill the field next to Host with Localhost. Then click on the tickbox next to Check All at Global Privilages. This will grant your new user access to all database features. Finally click on the Go button at the bottom to create your new user.

Your new user has been created and we can now continue with this how to install WordPress locally tutorial. In the next step, you will create a database that you will use with your local WordPress install.

Create a new database

You will now need to create a new database that you will use with your WordPress installation. This database will be the data storage for your WordPress installation and will hold all changeable data and values for WordPress.

Navigate to the Databases tab and let’s create a new database.

PHPMyAdmin Add New Database

At the top of the Databases page, you’ll see a section titled Create database. This is where you’ll create a new database. Enter a name for your new database and click on the Create button.

A Message will pop up telling you that the new database has been created. The new database will also instantly appear on your list of databases.

You’ve successfully created a new user, as well as a new database. Congrats!

We can now move on to install WordPress locally and complete the final steps.

Step 4: Install WordPress Locally

Now it is time to install WordPress locally on your computer. You now meet all the requirements, and you have a working database that can be used for your WordPress local install. All you need to do now is actually install WordPress and you’re done.

Head over to http://localhost/ or click on the Localhost option in WAMP Servers menu. This will open up the Localhost homepage for you again. This time, you will see a change in the homepage. Remember when you extracted the WordPress archive to C:\wamp\www? Well, now your localhost local development server picks up a new entry in its www directory, and lists it inside the Localhost homepage for your convenience.

To install WordPress locally now, all you have to do is click on its project. This will defer based on whether or not your renamed the wordpress folder after extraction. If not, yours will look like the screenshot above simply wordpress.

Clicking on your project will open up the WordPress installation Wizard, which will guide you through all the steps you need to take to install WordPress locally. Its quick, easy and you’ll have a working local WordPress installation within the next few minutes.

Update: It seems like the new WAMP server has a small bug. The link to your project under Your Projects will actually lead you to an incorrect location. Please navigate manually to http://localhost/<foldername> for example, if the folder / project is named wordpress, navigate to http://localhost/wordpress

WordPress install wizard

The WordPress install wizard is very easy to follow and will guide you through a few steps to install WordPress locally. Simply follow these steps in order to complete your installation of WordPress on your local computer.

After choosing your default language, you will need to enter the details you used to create a new user and database earlier. This will allow WordPress to connect to your local database and install the required data into the database. Enter the details exactly as you entered them while creating the new user and database.

Click on Submit after you’ve filled out the details. WordPress will try to connect to your database if everything goes well, you will see a screen that asks you if you want to start the installation. This means WordPress successfully connected to your database and can start to install WordPress locally. To start the installation of WordPress on your local computer, simply click Run the install.

The final step is to configure your local WordPress install configuration. This is basically your site details, such as the title of your site and a main admin user.

Fill out the Site Title, Username, Password and Your Email fields. Take down these details as you will need them to log into the admin area after you’ve installed WordPress locally. To finish the process, click on Install WordPress.

A Success screen will tell you that the installation is complete and that you can now login to your locally installed WordPress website. Click the Log in button and enter the user details you used.

Local WordPress admin login

You’ve successfully installed WordPress locally. Congrats!

Final Words

You now know how to install a local development environment on your Windows computer, how to set up a local database and how to install WordPress locally.

This is a very useful tutorial if you want to:

  • Test a theme or plugin before using it on your live WordPress website
  • Develop WordPress themes and plugins locally without effecting your live WordPress website
  • You want to customize a theme or plugin, but want to test out your customization before uploading to your live WordPress website
  • You want to use WordPress for a feature that doesn’t require it to be online, like as an offline project or customer management solution

Thank you for taking the time to read through my How to Install WordPress Locally tutorial. If you found this tutorial useful in any way, please consider sharing the post so others can learn more about how they can also install WordPress locally on their computer.

Thelma Anderson

Click Here to Leave a Comment Below

Leave a Reply: