Setting up a Wamp Server in WindowsXP
I’ve decided to create a more simplified tutorial version for the setup of the Wamp server, as this seems to be the area that most ladies in the WPLB yahoo group have troubles with. Everything that follows assumes that you are installing Wamp into C:\wamp on your hard drive in WindowsXP without a Firewall.
First, you will need the Wamp5 Server software, which can be downloaded here. Run the install, follow the prompts, and use the defaults. When it asks you wich browser you would like to use, point it to the exe file where your browser is located. For mine, since I am using Firefox, I pointed it to C:\Program Files\Mozilla Firefox\ and chose Firefox.exe.
Now Wamp should be fully installed. Run Wamp so that you can see it sitting down next to your system clock. If the Wamp server is running, the little icon should be all white. If it’s not, left click to bring up the menu and choose Start All Services. If you encounter no problems, then left click again and choose Localhost. This will bring up your browser and you should see a Wamp page.
Now we need to configure Apache. Left click on the Wamp icon and go to Config Files. Open the httpd.conf file (open with Notepad). In Notepad go up to Edit/Find and search for this line:
#LoadModule rewrite_module modules/mod_rewrite.so
Uncomment that line by removing the pound sign. Now find this line:
#AddModule mod_rewrite.c
Once again, remove the pound sign from in front of the line. Save your changes by going up to File/Save (not Save As).
Now we need to edit your host file. This can be found in C:\windows\system32\drivers\etc\ If you cannot see a file in there called hosts, be sure to set your folder settings to be able to view hidden files. Open your hosts file in Notepad. Now you need to decide what “domain” name you are going to use. As a sample for this tutorial I will be using yoursite.com so remember to replace that with your chosen name. Add the line below in bold above or below the localhost line that is already there. I added mine above it and here is what it looks like:
127.0.0.1 local.yoursite.com
127.0.0.1 localhost
Save your changes by clicking on File/Save in Notepad.
Now go to the C:\wamp\www folder. Inside of the www folder, right click anywhere and choose New/Folder. Create a folder called yoursite.com. This is odd for some people as they have never before created a folder with a .com in the folder name, but it is very important that you name your folder that way. The yoursite.com folder is now your root directory. Go into the yoursite.com folder that you just created and create another folder called logs (with an s on the end).
Now that you’ve done that part we need to edit your httpd.conf file again. Left click on the Wamp icon and go to Config Files and choose httpd.conf. Once you have that open again in Notepad, scroll all the way down to the very bottom of the file. You will need to add the following lines (with no pound signs). Edit the parts that say yoursite.com and change them to the same name you added in your hosts file (make sure you do not add a .com in the ErrorLog line):
NameVirtualHost 127.0.0.1
DocumentRoot “C:\wamp\www”
ServerName localhost
DocumentRoot “C:\wamp\www\yoursite.com”
ServerName local.yoursite.com
ErrorLog logs/yoursite_error.log
Save your changes and restart Apache by left clicking on the Wamp icon and choosng Apache/Restart Service.
Before we do anything else we need to add a few files to your root directory (remember, this is the yoursite.com folder). Open Notepad and in a new blank file put this short line of code in there:
< ?php phpinfo(); ?>
Now save the file as phpinfo.php into the yoursite.com folder (just backspace over the *.txt in the file name box when saving the file as phpinfo.php).
To test this and make sure everything is working correctly, point your browser to:
http://local.yoursite.com/phpinfo.php
You should see a page with the PHP version and a bunch of other stuff in it. Let me point out here real quick that “local” in the url path is where copies are stored from your root directory. We only used local in the path to test that everything is working. When you are all finished with this tut, the correct path to your site will be http://localhost/yoursite.com
Now let’s test the mod_rewrite functionality (remember those two lines we uncommented before in the httpd.conf file?). Open Notepad and in a new blank file place this code in there:
RewriteEngine on
RewriteRule ^test\.php$ phpinfo.php
Save the file as .htaccess (with a period in front of the file name) into your root directory (remember, this is the yoursite.com folder).
Now let’s run the test by pointing your browser to:
http://local.yoursite.com/test.php
You should see the exact same page that you saw before with the phpinfo.php.
That’s it! Now you are ready to install WordPress onto your computer
Since no one in the WPLB group had problems with the install of WordPress (once getting all the above done and working), I feel that you should continue with John’s WordPress installation tutorial which can be found on page 4 here.
Have fun with your new Wamp server!