Install Wordpress with WAMP

From TomSchaefer.org Wiki

Jump to: navigation, search


This is going to show you how to install word press with WAMP


WordPress requires several pieces of software:

   * A webserver
   * PHP configured to work through the webserver
   * A MySQL database


Installing WAMP

Once the software is downloaded we can begin to install it:
File:Install1-1-.png

The installation process is very straightforward. First we choose a destination directory. The default is ideal.

File:Install2.png

Next we choose whether to automatically start WAMP. You can tick this if you want, but Apache and MySQL make heavy use of system resources and we don't always need them running. It is much better to start the software on demand, and so leave this option unchecked.

File:Install3.png

The software will now install.

File:Install4.png

After all the files are extracted we are asked for the DocumentRoot directory. This is the root directory for your website and will contain WordPress and any other files you want accessible through the webserver. Unless you have a specific reason, go with the default.

File:Install5.png

Next we are asked for the default browser. Your choice here is not really important, so pick whichever browser you prefer.

File:Install6.png

And that's it! We now have a fully working webserver on our computer.


Once WAMP is running we have this:

File:Toolbar.png

If all goes well your browser will shortly display this:

File:Wamp-localhost.png

Welcome to your very own webserver!



Configuring MySQL & phpMyAdmin

Before we can install WordPress we need a small amount of MySQL configuration. The WAMP installation creates a default MySQL root account with no password, and we should change this.

The simplest method is to use a tool called phpMyAdmin. This is a PHP interface to MySQL, and is also installed by WAMP. You can run phpMyAdmin from the WAMP menu. Once your browser loads it will contain this screen:

File:Phpmyadmin.png

Note the warning at the bottom – this is because root has no password.

Let's add a password by clicking on the 'Privileges' link. From the privileges screen we can add and delete users, as well change the privileges and passwords assigned to existing users. We want to edit the 'root' user, so click the 'edit' icon on the far right of the user root.

File:Privmainscreen.png

There will be a lot of information on the edit privileges screen, but we are only interested in the Change Password section:

File:Changepass.png

Enter an appropriate password, enable the circle next to 'Password', and then click 'Go'.

Now that we've changed the root password, phpMyAdmin no longer has access to MySQL. If we try and do anything else we get an error:

File:phpmyadminerror.png

This is just what we want. Now we need to update phpMyAdmin to use the new password. Edit the file config.inc.php located in phpMyAdmin directory of our localhost document root. If you used the defaults at installation this should be C:\wamp\www\phpmyadmin\config.inc.php

Scrolling down a page or two you should find this section:

 $cfg['Servers'][$i]['user'] = 'root'; // MySQL user
 $cfg['Servers'][$i]['password'] = ; // MySQL password

Enter your password between the quotes:

 $cfg['Servers'][$i]['user'] = 'root'; // MySQL user
 $cfg['Servers'][$i]['password'] = 'mypassword'; // MySQL password

Now when you return to phpMyAdmin both the warning and error will have disappeared.


There are two ways to install WordPress:

   * Install a fresh copy of WordPress on a clean database
   * Create a duplicate of an existing WordPress installation, complete with posts

Regardless of which you want, we need to do two database tasks before we continue.

  1. Create a WordPress database
  2. Create a WordPress database user

Both of these tasks are performed from within phpMyAdmin. Creating a database

Creating a database is very easy with phpMyAdmin. From the front page enter the database name in the MySQL section:

File:newdatabase.png

Here I've given the database a name of 'wordpress'. If you are duplicating a live site then use the same name you have on your live database.

Once you click create you will be told that a new database has been created and the left menu should be updated to contain this database. That's all we need to do. Database user

We shouldn't use the root account for WordPress, so here we create a new user. If possible our new user account should match the one used on our live WordPress installation.

Go back the phpMyAdmin privileges screen and this time select 'add a new user'

File:adduser.png

Now enter the details for your new WordPress user. Make sure to set the 'host' to 'local' – this ensures only our local machine can login as the user. Don't add any global privileges.

File:wordpressuser.png

Here I've created a user called 'wordpress' and given it the password 'wordpress'. If you are creating a duplicate of a live site then set the username and password to whatever you use there.

Next we need to add privileges for this user to access the WordPress database. On the returning screen is a 'Database-specific privileges' section:

File:databasespecific.png

Select the WordPress database from the drop-down list. The screen will then refresh and you can select 'Check All' to give the user full access to the WordPress database.

File:grantprivs.png

Now copy download wordpress and extract its contents to the www directory. Follow its instruction in the readme.html. After you read that don't forget to edit you wp-config.php to match your database!

EDIT: I found out that when you browse the wordpress from another computer the theme tries to load from localhost. All you need to do is change a setting in the Worpress configuration. Just go to options and under General change both field from localhost to your website address.

Thats it from me.

Personal tools