WordPress on WAMP

WordPress on WAMP

Maintaining a ‘parallel’ WordPress website on a local WAMP server allows safe experimentation before committing major changes to your live site. It also provides a working backup of the WordPress files and the associated WordPress mySQL database.

WAMP Installation

Click here for a description of WAMP and click here for WAMP installation procedures.

WordPress Installation

WordPress comprises two major components;

  • The WordPress database
  • The WordPress file system

Setting Up a WordPress Database

WordPress makes extensive use of a mySQL database to keep track of the Website’s resources. WampServer comes with phpMyAdmin, a web based application to manage MySQL databases. We will use phpMyAdmin to create the mySQL database.

Most Website hosting services also provide phpMyAdmin to create and maintain mySQL databases for WordPress and other Web based applications requiring database services.

Click on the Wampserver icon in the windows taskbar and select <phpmyadmin>.

Log in to phpMyAdmin as follows:
username: root
Password: empty on first use (ie leave blank)
Click <Go>

We must set up a password for the database and we do that In the phpMyAdmin General Settings panel:

Click <Change password>
password: pass (change pw to ‘pass‘ )
Click <Go>

Click <Databases> in phpmMyAdmin to create a new database for WordPress.
Choose a name for your database: wp_mydb
Click <Create>

The database will be empty and contain no tables. Tables will be added automatically during the setup of the WordPress File System.

Make a note of the database name, the username and the password because they will be needed for setting up the WordPress file system:

database name: wp_mydb
user name:     root
password:      pass

Setting Up a WordPress File System

Download a copy of latest WordPress (e.g. 4.7.5) from WordPress.org.

Extract the zip file and note that ‘wordpress’ folder exists.
Paste the extracted wordpress folder into :

C:\wamp\www or  C:\wamp64\www
Rename the wordpress folder to anything you want e.g. : wp_my-site

Open a web browser and go to:

The  WordPress  site initialization process will begin:

Accept the default language: English (United States)
Click <Continue>

Read the WordPress Welcome Screen:
Click <Let’s Go>

Enter Database Connection details as follows:

Database name:    wp_mydb
Database username:root
Database password:pass
Database host:    localhost
Table prefix:     wp_

Click <Submit>

You will get a Message:
All right sparky You’ve made it through this part of the installation.
WordPress can now communicate with your database. If you are ready, time now to…

Click <Run the Install>

You will get a  Message:
Welcome to the famous five-minute WordPress installation process!

Information needed

Please provide the following information. Don’t worry, you can always change these settings later.

Site Title: MySite
User Name: epic
Password: MyPass,Plenty-Strong
Your Email: epic@amnet.net.au

Click <Install WordPress>

You will get a  Message:
WordPress has been installed. Thank you, and enjoy!

Username:  epic
Password: your password
Click <Login>

Requests credentials
Username or Email Address: epic
Password: MyPass,Plenty-Strong
Click <Login>

Your browser to the MySite Dashboard
Hover your mouse over the site name (MySite) adjacent to the WordPress logo and Click <visit site> to view the  default empty site.

So far so good!

You should see the same default empty site

You should see the dashboard for the same default empty site

So that’s it for now:
A working, albeit empty site on your computer

A Peek at the Database and File System

Start phpmyadmin again by clicking on the Wampserver icon in the windows taskbar and selecting <phpmyadmin>.

Log back in to phpMyAdmin as follows:
username: root
Password: pass
Click <Go>

Select the WordPress database; note that there are now  12 tables

Open the file wp-config.php in the WordPress File System e.g.  C:\wamp64\www\wp_my-site

Check Content of wp-config.php

 define('DB_NAME', 'wp_mydb');
 define('DB_USER', 'root');
 define('DB_PASSWORD', 'pass');
 define('DB_HOST', 'localhost');
DB_NAME must match the mySQL name 
DB_USER must match the mySQL user name
DB_PASSWORD must match the MySQLdatabase password

WordPress will not work if the mySQL connection details contained in the wp-config.php file do not match the connection details set up for the WordPress mySQL database.

Eric Pickstone