Installing WordPress Locally using EasyPHP

Posted on Thursday, May 5th, 2011 at 8:56 pm in

EasyPHP is a WAMP package that includes PHP, Apache and MySQL — as well as easy development tools such as the database manager, PhpMyAdmin.

Install EasyPHP

Download EasyPHP.

Apache (the web server) does not always like path names with spaces. So when you install EasyPHP, make sure you do not have any spaces in your installation path. Instead of using the default installation folder (C:\Program Files (x86)\EasyPHP), change it to something like C:\EasyPHP.

This will also by-pass a potential issue whereby Windows 7 restricts access folders within the C:\Program Files (x86) folder.

Wrangle Windows 7

Windows 7 does not handle localhost in the same way as older versions. Previously, Windows stored a localhost line in the machine’s hosts file by default but this is no longer the case. You need to modify the hosts file manually.

Navigate to the hosts file in C:\Windows\system32\drivers\etc and open it in a plain text editor (eg NotePad). Just after the initial comments, you should see the line:

# 127.0.0.1 localhost

Remove the hash sign (#) from the start of the line and save the file.

Configure Apache

You need to make 2 changes within Apache if you want to use custom permalinks:

  1. Activate the rewrite module
  2. Give permission for WordPress to rewrite

To activate the rewrite module, you need to edit your Apache configuration file — called httpd.conf — within the conf_files sub-folder of your EasyPhp folder. Right-click on the EasyPHP icon, select Configuration → Apache. This will launch the httpd.conf file in NotePad.

Find the line that reads:

# LoadModule rewrite_module modules/mod_rewrite.so

And remove the hash sign (#) from the start of the line, so that it reads:

LoadModule rewrite_module modules/mod_rewrite.so

You then need to make a permissions change in the same file. Find the line that reads:

<Directory "${path}/www">

A few lines further down should be:

AllowOverride None

Change this to:

AllowOverride All

Save your httpd.conf file, then restart the Apache server by double- clicking the EasyPHP icon in task bar. In the popup dialogue, click the Apache button and select Stop. Wait for the bottom red light to show, then click the Apache button again and select Start. You can then minimise the dialogue box.

Create your WordPress Database and User

Start EasyPHP.
Once it has started, right click, chose Configuration and click PhpMyAdmin.

Enter a name for your new database (e.g. wordpress) by filling in the empty Create new database field. Ensure that the database name is all lowercase and contains only letter (and underscores, if needed). Make a note of the database name, then click Create.

Next, you need to set up a new user. In PhpMyAdmin, go to Privileges and click Add a new User.

On the Add a new User page, type a username (e.g. wpress) in the User name field. Under Host, select Local from the dropdown and type in localhost. Click the Generate button to create a password.

Make a note of the username and the password.

Under Global privileges, click Check All followed by the Go button at the bottom of the page.

You have just created a database and a user!

You should also have a copy of the:

  • Database name
  • Database username
  • Database password

Install WordPress

Locate your EasyPHP document root folder It’s should be something like C:\EasyPHP-5.3.6.0\www\. Download WordPress, unpack the archive and drop the complete wordpress folder into this sub-folder.

Open your web browser and navigate to http://127.0.0.1/wordpress/wp-admin/install.php

Click Create Configuration File followed by Let’s go

Now enter your database name, username and password. Set the database host to 127.0.0.1 and click Submit followed by Run the install.

Complete the installation form. Most of this data can be easily changed via WordPress later on with one exception — the Primary Admin username. Consider it good practice to use something other than “admin”. It probably won’t matter on a local installation but when installing on a remote (live) server, using a non-generic username will enhance your overall security.

Once the form is complete, click Install WordPress. Once the installation is complete, make a note of your login URL. You might want to bookmark in your web browser (it’s a lot easier than typing it in every time).

Congratulations — you have just installed WordPress locally!

Change your upload limit

Stop the EasyPHP server (right-click – Stop).
Using the same context menu, navigate to Configuration → PHP.
Use Find tool and search for each of these separately and change

post_max_size = 8M
upload_max_filesize = 2M
max_execution_time = 30
memory_limit = 8M

Change to:

post_max_size = 110M
upload_max_filesize = 110M
max_execution_time = 1000
memory_limit = 256M

Save the file and then navigate to Configuration → MySql.
Find max_allowed_packet and increase it to 110M.
Save the file and restart EasyPHP.

You might also be interested in

WordPress Support Services

Top