Install WordPress locally using WampServer (WAMP) – Part 2

| |

In the first part of this tutorial on how to install WordPress locally we downloaded and installed WampServer. In this second part we´ll complete our local set up by creating a database and installing WordPress.

If you´ve read our previous guide on installing WordPress this process should be pretty familar.

Create a MySQL database and user

We´ll use phpMyAdmin to create our database and user. You can access phpMyAdmin anytime when WampServer is running via http://localhost/phpmyadmin/ or by clicking the phpMyAdmin link on the WampServer welcome screen at http://localhost/

Important: don´t copy the database name and username from this article. Use your own secure names instead. If you already installed WordPress on a live server, we recommend you to use the same database name and user for yor local instance.

In phpMyAdmin, select the Databases tab in the top menu, write your database name in the input field and hit the Create button.

Create Database in phpMyAdmin

Your new database will now show up in the list of available databases. Click on the name of your database. This will open your database settings panel.

Add user in phpMyAdmin

Select the Priviliges tab from the top menu and click on the Add user on the bottom of the page. A form will pop up with three fields:

  1. Login information
    Fill in a username and strong password. Copy these details, you´ll need them in a minute. Set the host field to local.Add user in phpMyAdmin - Login info
  2. Database for user
    Verify that your newly created database is selected.Add user in phpMyAdmin - database info
  3. Global priviliges
    Don´t select any Global priviliges – our user only needs access to the WordPress database.Add user in phpMyAdmin - Global privileges

When done, click Add user.

Install WordPress

On a live webserver, websites usually have their own public_html directory where all website files and scripts are located.

If you´re hosting your WordPress site on a shared server, you´ll only get access to the public_html folder of your own website. However, with WampServer we have a complete server at our disposal. We can create as many websites as we want and install as many instances of WordPress as necessary.

In a WampServer envireonment, each site is called a project. Creating a project is as simple as creating a new directory in the www folder. By default the directory is located in C:wampwww

Browse to the www-folder and create a new directory using the name of your website.

Download WordPress and place all files in your newly created folder. The result will look like this:

WampServer directory structure

Open http://localhost/my_website/ in your browser (replace /my_website/ with the name of the folder you created). WordPress will ask you if you want to create a configuration file. That sounds like a good idea. Click the Create a Configuration File button.

On the new screen, you´ll be asked to enter your database name, username and password. Also change the wp_ prefix. When done, click Submit and Run the install on the next screen.

WordPress installation panel

The next screen should look familar: you´ve now installed WordPress on your local computer. Fill in your site details and don´t forget to change the admin username.

When done, you can find your new WordPress site at http://localhost/my_website/


Install WordPress locally using WampServer (WAMP)

Create Unique Domain Names Using Virtual Hosts