Installing WordPress on your own Windows computer

We generally become WordPress users to create a blog for everyone to see. This can involve the purchasing of a domain name and web hosting. These we treat as black boxes on which the WordPress software is installed, and everything magically works. This is exactly how it should be.

Although WordPress provides a comprehensive management interface, there are times when it would be better to have our own local copy, running on our own machine. There are several reasons we would want to do this:

  • A working backup of our online site
  • A development site to develop plugins and themes without affecting our online site
  • A testing area to try out hacks and new versions of WordPress without fear of corrupting the live site
  • A staging area to create and verify posts, before releasing them live

Just like in a commercial environment, it helps separate our blog into two parts: production and development, or live and test. Our production blog is the one that is visible to everyone. It might not contain the latest information or the most up-to-date software, but it is fully working and error free. Contrast this to a development blog where we have the very latest software and information, but possibly not fully working.

Separating our site gives us the freedom to experiment without fear of destroying the working version. At the very worse, if the development blog is corrupted we simply re-install the software, and the only loss is our own time. If we corrupt the production site then no one can access our information and we lose visitors.

In writing a set of articles dissecting a WordPress theme, I realised that a lot of people are directly editing their live site. There are many reasons for this, but a good one is probably due to the difficulty in setting up a local system. This is a short guide to try and explain how to do just that.

Installing the server software

WordPress requires several pieces of software:

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

None of these are particularly simple pieces of software, and all require configuration to work together. Fortunately there is a lovely software suite called WAMP that packages these together and adds a nice front-end. This is definitely the fastest and easiest way to get it working.

Consequently, the first task here is to download the latest WAMP. Note that this only works on Windows 2000/XP, so I’m afraid you are out of luck if you have anything earlier.

Installing WAMP

Once the software is downloaded we can begin to install it:

WAMP

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

Choose directory

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.

Auto-start

The software will now install.

Installing

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.

Document root

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

Browser preference

And that’s it! We now have a fully working webserver on our computer. This same software is used in hundreds of thousands of websites across the world. We also have MySQL to provide our database, and PHP to run WordPress.

332 comments

  1. i got the website workinng on localhost when i test it BUT what i want to know is how do i host my own website??

  2. Unless you have a static IP address then you cannot effectively host a website on your computer, and have it available on the internet. If you do have a static IP address then people should be able to connect to your webserver (provided no firewalls prevent it)

  3. hey. did it.
    i hit a gaggy once and want to remind others following the tutorial:
    WHEN CREATING DATABASE, REMEMBER TO SET HOST TO ‘LOCAL’!
    that’s what got me. i took a break and redid the process again. now all’s clear.

    – – –

    hey john, what’s great is learning how easy it is to use WAMP. my friend recommended it once, but without instructions. two years back, i was the suffering fool with piles of php, mysql and server related books by my computer, trying just to set up the database. now i don’t even need to get so detail oriented, and still have my thing working.

    KUDOS to you. thanks!

  4. I was using phpdev until earlier today when I managed to mess that up completely while trying to run two different instances of wordpress. I can’t tell you how great it was to find the urban giraffe had a page to save the day (although not entirely surprised).

    Hat tip, kudos, and thanks.

  5. My phpinfo.php page works great, but not the testing.php thing!

    here’s what I have:

    httpd.conf file:

    NameVirtualHost 127.0.0.1

    # VirtualHost example:
    # Almost any Apache directive may go into a VirtualHost container.
    # The first VirtualHost section is used for requests without a known
    # server name.

    DocumentRoot “C:\wamp\www”
    ServerName localhost

    DocumentRoot “C:\wamp\www\testing.com”
    ServerName local.testing.com
    ErrorLog logs/testing_error.log

    .htaccess file:

    RewriteEngine on
    RewriteRule ^test\.php$ phpinfo.php

    This works – http://local.testing.com/phpinfo.php

    This doesn’t – http://local.testing.com/testing.php

    Any hints? Please?

  6. Hi, I was trying this out, and I’m not able to find the area of the httpd.conf file when I search it. Am I just blind, or am I looking in the wrong place?

  7. Yep, its typically at the very bottom. However, I have noticed that the latest versions of Apache store the virtual hosts in conf/extra/httpd-vhosts.conf. It’s possible that WAMP has been updated and you may find the hosts there.

  8. I install apache on win2003 server
    I want to config apache for virtual host my documentroot is on another coputer on lan this is my config:
    isten 50070

    DocumentRoot ????
    serverName mali

    my files is on another computer 172.16.10.2
    f:/prg
    how can I solve this?

  9. I have followed your steps and everything went fine until I tried to access the WP’s Admin panel. I hve checked the database, username and passwords and they are correct (BTW this is an imported database).

    When I try to enter into the admin panel I get this message:

    Fatal error: Call to undefined function get_option() in C:\wamp\www\[my directory]\wp-admin\admin.php on line 7

    There was one thing that went differently from what you explained and that is when you asked to uncomment the two mod_rewrite lines. There was only one in my httpd.conf, so I uncommented that one (I ran the find command several times.)

    when I ran the phpinfo.php and the test.php they both worked.

    Any suggestions?

  10. When I do a search for the word mod_rewrite in httpd.conf, I only find…

    #LoadModule rewrite_module modules/mod_rewrite.so

    The second one (#AddModule mod_rewrite.c)isn’t found in the file. Will this cause a problem?

    Also, when I attempt to edit the file C:\windows\system32\drivers\etc\hosts, it will only save as a .txt file; is that correct? There’s still a URL:File Protocol file there names ‘hosts’ that I can’t delete or save as.

    When following through the rest of the directions with the above issues, when I get to the point where I test the virtual host (http://localhost.bodybanks.com/phpinfo.php), I get a page stating that “localhost.bodybanks.com…This page is parked free, courtesy of GoDaddy.com” (my site is hosted on GoDaddy)”.

    Would this be caused by one or both of the two issues listed above, or is there maybe something else amiss?

    BTW, thank you very much for all your hard work and support! 🙂

  11. I am another one that can’t get the phpinfo.php to work. I get “page cannot be displayed. I pinged localhost and local.binaryabstractions.com just fine. But, unlike everyone else…when I try http://127.0.0.1/phpinfo.php I still get “page cannot be displayed” Any help would be sooo appreciated.

  12. Elisabetta: After you import the database, did you go to the wp_options table and change the siteurl? This needs to point to your local WordPress, not the remote WordPress, otherwise you won’t be able to access the WP admin pages.

    Michael: The hosts file must be saved as ‘hosts’, not ‘hosts.txt’. If you can’t save as anything other than hosts.txt you need to get a better text editor (try Ultraedit). This is probably the reason why, when you access localhost.bodybanks.com, you are getting a GoDaddy page from the Internet.

    Melissa: Did you create phpinfo.php and save it in your documentroot?

  13. […] I’ve been following Urban Giraffe’s directions for installing WordPress on your local machine so that I can mess around with making my own templates without screwing anything up beyond repair here on the real site or using up my own bandwidth until I have everything the way I want it. Downloading and installing Apache and MySQL went okay, but when I tested the mod_rewrite function by creating an .htaccess file (just as he directed), it didn’t work. The test.php address returns a 404 page, no matter what. Looking through the comments, I tried all the stuff mentioned (at least, I think I did – some of this stuff is above my head). When I pinged local.theoffwhites.com, I got 127.0.0.1, so that’s not the problem. I have the .htaccess file in the root (again – I think I do, anyway). […]

  14. I followed the instructions and had a very smooth installation. Everything works well on my local computer. However, when I tried to access my blog from another computer on the same network, I run into problems. I could view the homepage of the blog, but all the links are directed to the localhost, not the IP address that the WP runs on. Any idea to fix this would be much appreciated.

  15. The method described here isn’t really suited for a local area network. The name you put into the hosts file is only available on your machine, not anyone elses.

    You can either:

    Setup a DNS server on your LAN, and put the name in there – complicated
    Modify everyones hosts file and add an entry for your computer, with the correct IP address
    Modify WordPress and set the blog address to be the IP and not the hostname

  16. “After you import the database, did you go to the wp_options table and change the siteurl?”

    Yep, I did. Will check again, but I have checked that one step you mention about 5 times.

  17. It’s hard to say what’s wrong without having access to the configuration files. If you send the Apache config file and also php.ini (somewhere in the WAMP directory) to me then I’ll see if there’s anything obvious there.

  18. Fantastic job John. Couple of comments;

    1) I could only find one line that referred to mod_rewrite
    2) Skype seemed to foil my running of Apache so I have to quit it to get the service to run.

    Thanks for great article.
    MJ

  19. Just so you know, this line: ‘if ($_SERVER[‘HTTP_HOST’] == ‘local.urbangiraffe.com’)’ doesn’t work because it’s only supposed to have one = in the middle. The script as you have it has never worked for me, and I decided to find out why.

  20. Okay, that gets it to work on the local server, but then the live one is looking for the local server instead of using my live host.

  21. Ok, first of I would like to say thanks a mil for
    the tutorial.

    Onwards –
    For some reason, after editing the httpd.conf file
    I lose connection with Apache. If I leave it intact
    the way it was when downloaded, Apache is connected fine.
    Now this is even weird. I can acutally access the phpinfo.php
    file and all my hosts listed in the ‘C:\windows\system32\drivers\etc\hosts’
    through the localhost page. Below it will say Projects and
    a list of all my local hosts. When I click on one of them it
    will display what is within those hosts which are directories
    created in the www root file in wamp. So basically I am able to access
    these hosts without editing the httpd.conf file. What should I do.
    Should I move on to the next step?

  22. I am totally stuck. Editing the Virtual hosts
    in the httpd.conf file disconnects Apache, and
    doesn’t allow me to restart.

    here is what I did”

    NameVirtualHost 127.0.0.1

    DocumentRoot “C:\wamp\www”
    ServerName localhost

    DocumentRoot “C:\wamp\www\mysite.com”
    ServerName local.mysite.com
    ErrorLog logs/mysite_error.log

    after restarting wamp, I get 1 out of 2 services running.
    Trying to resume Apace doesn’t do anything.
    everything looks fine in the ‘C:\windows\system32\drivers\etc\hosts’
    and ‘C:\wamp\www\mysite.com’ is created properly, with the phpinfo.php
    file inside. No firewalls running or any other program that’ll
    take up ports.

    I am using wamp version 1.6.1

  23. ok I figured it out. For some reason in the version I have
    removing the lines that I am not using causes apache
    to disconnect. Therefor you should change
    step two to something that looks like this:

    NameVirtualHost 127.0.0.1

    #
    # VirtualHost example:
    # Almost any Apache directive may go into a VirtualHost container.
    # The first VirtualHost section is used for requests without a known
    # server name.
    #

    # ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot “C:\wamp\www”
    ServerName localhost
    # ErrorLog logs/dummy-host.example.com-error_log
    # CustomLog logs/dummy-host.example.com-access_log common

    #

    # ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot “C:\wamp\www\mysite.com”
    ServerName local.mysite.com
    ErrorLog logs/mysite.com-error_log
    # CustomLog logs/dummy-host.example.com-access_log common’

  24. Kathy: That line is correct, and is supposed to have two equals otherwise it won’t work at all, and you’ll experience the problem you discovered afterwards. Did you change the local.urbangiraffe.com to the name of your own server? That may be the reason it didn’t work previously.

  25. […] After feeling helpless for a while my prayers were finally answered. I discovered a neat little server package called WAMP. WAMP stands for Windows, Apache, MySQL and PHP. Basically I would use any Windows XP or 2000 machine and have Apache, MySQL and PHP running within minutes. I even found an awesome tutorial that gave me step by step instructions on installing WordPress. Within minutes I had my entire site duplicated on a computer at home. Now I could safely destroy my site at will and not worry about. […]

  26. […] Up till now, my host still hasn’t been able to restore my database (i.e. all the old posts and pages and comments and … content, basically) because of some SQL errors, so … I don’t know. I actually tried restoring the same backup file to a local WordPress installed on my computer (I’ve just discovered that it’s possible to have a running WP with PHP and MySQL on your own computer, thanks to Grace for pointing me to this tutorial . I use it to test my themes.), and it worked fine. There must be something with the server, arghhh. […]

  27. I really appreciate this work. I wanted to just comment that for some of you who can’t get past the 1/2 servers running or that you can’t get the http://local.servername.com/phpinfo.php to work, this is what I did.

    1. I took out the second AddModule command. I had added it because I couldn’t find it but that was preventing the Apache server to start.

    2. In the httpd.conf file, I made a slight change by adding the forward slashes (I know, I should have known to have done that) and changing the Server name from localhost to local.servername.com = just as below. Thanks.

    NameVirtualHost 127.0.0.1

    DocumentRoot “C:/wamp/www”
    ServerName local.urbangiraffe.com

    DocumentRoot “C:wamp/www/urbangiraffe.com”
    ServerName local.urbangiraffe.com
    ErrorLog logs/urbangiraffe_error.log

  28. […] I was supposed to, as I kept saying, write the review today, but I got sucked into this local installation thing and it’s driving me f. nuts. I think I’ll have to admit defeat on both for today, and use this weekened to get them up and running by this Monday. […]

  29. One more thing, if you are getting the error establishing database connectin page, try changing the user to “root” as unless you changed that in the phpmyadmin config.inc.php file, “root” is the Mysql username.

  30. First of all, a big thank you – I love this tutorial!! But…. I am having issues very similar to a number of the posts above. I’ve set everything up as instructed:

    I added to hosts file:
    127.0.0.1 local.creativepathstudio.com

    httpd.conf looks like this:

    DocumentRoot “C:/wamp/www”
    ServerName localhost

    DocumentRoot “C:/wamp/www/creativepathstudio.com”
    ServerName local.creativepathstudio.com
    ErrorLog logs/creativepathstudio_error.log

    I’m seeing the correct Wamp 5 default page when I type in http://localhost/; I even see my subdirectory of creativepathstudio under the “Your projects” heading. When I type in localhost/creativepathstudio/phpinfo.php, I see the phpinfo page. However, I get a Not Found Page with http://local.creativepathstudio.com/phpinfo.php.

    I’ve pinged local.creativepathstudio.com and I get 127.0.0.1. It seems everything is configured correctly but obviously something is not right.

    Any help is greatly appreciated.

  31. Hi! Great Tutorial here, guess somethings are not meant for newbies. I have a few questions here, soor if they appear silly:
    1. In the rewrite module :Rewrite module I don’t see #AddModule mod_rewrite.c
    2. Where do I put the phpinfo.php – ie which Directory, I am unable to bring up
    the PhP Version Screen.

    3.How do I create a htaacess file, and wher do I put it.

    Thanks for your answers, I’ll give it another shot at it.

    Have a Good Day, and keep up the Good work.

  32. Trish, you need to set the ServerName to local.creativepathstudio.com

    Kisumi, there are some previous comments about the addmodule bit. You can ignore this if you have a new version of WAMP. The phpinfo.php goes into whichever directory you have as your document root. By default this is c:\wamp\www. You can create an .htaccess by saving a text file as .htaccess – you’ll need something like ultraedit to do this,

  33. […] Oh, right, I should’ve mentioned this one earlier: If you’re making a WordPress theme, INSTALL WORDPRESS ON YOUR COMPUTER. (You might have noticed how the entries of most of these theme screenshots are all the same, and contain an image, a blockquote, and some lists to show the CSS styles.) Urbangiraffe.com has an excellent tutorial on how to do this. (Thank you Grace, for letting me know about this fantastic ability!) You can’t believe how much better it is to test your theme on your computer, instead of a live website. There’s much less panicking and rushing. Make your local WordPress as similar as possible to your site, if you have plugin X on your site, then install plugin X on your local WP too. After you’ve squished all the bugs and finalised your theme, all you have to do is upload the same exact theme files to your real site, and voila, you’re done! […]

  34. Wow, this is an awesome tutorial. Thank you for sharing.

    However, it makes me wonder if it’s possible to install WordPress to my computer without WAMP? This is because I have already installed and configured Apache, PHP and MySQL. If it’s possible, do I go about the same way as with your tutorial? Or is it done differently?

    Thank you for your time. And, again, thank you for sharing such useful information.

  35. […] I’m working with WordPress, again, and thanks to Aneesah for that. She wrote a blog about making themes for WordPress. She provided a link to a tutorial of urbangiraffe.com, a tutorial about a server offline at your own computer. So, I followed that tutorial and after some struggles (with localhost etcetera) I did it. Really proud of myself and others noticed that. They’re not as ‘geekish’ as I am, so they didn’t understand why all the happiness was for. And because I did it, I felt like I could make a WordPress theme too (because urbangiraffe also wrote a tutorial (or guide) to do that. I love that website!) Well, you can see the result! […]

  36. It doesn’t matter if you have WAMP installed or not. If you’ve got all the right programs running (Apache, PHP, MySQL) then installing WordPress is exactly the same.

    The only issue you might have is whether you’ve also installed phpMyAdmin. If you haven’t then you’ll need to do that first. It’s not the most straightfoward of programs, but if you’ve managed to get the rest of the pieces on place then this one should be a cinch!

  37. I tried to find #AddModule mod_rewrite.c and C:windowssystem32driversetchosts in the httpd.conf file, but I couldn’t find it. What do I have to do? By the way mine is Version 1.6.4, does that make a difference?

  38. Hi! I have a problem: on the Rewrite module step I find #LoadModule rewrite_module modules/mod_rewrite.so but not #AddModule mod_rewrite.c in the file. What should I do? Just ignore the missing command?

    Another thing: on Step 2 – Modifying httpd.conf, should I substitute the ENTIRE blue background bordered text you copied and pasted on this tutorial or add something at the end?

    Sorry: it’s just that I’m stuck on these two things.

  39. Excellent tutorial. Thank you very much. I’ve just started using WordPress and have been experimenting with it for less than two weeks on a host that had a ready-made installation. Your directions were very clear and easy to follow for me to get everything installed locally and exported/imported over. Now I feel much more comfortable about being able to do backups and restores, and it is of course very good to be able to experiment locally now before updating the main site.

  40. I have 2 quick questions. Bare with me since I am totally new in this and this may sound really stupid.

    1. After the installation of WAMP (v 5.1.6.4), you wrote
    “you can test the system by opening a browser and enterring “localhost’ as the URL”
    What do you mean by ‘localhost’ here? Do I need to type a specific address? or literally type ‘localhost’?

    2. When WAMP is running, there is an option says put online. Should this be enabled?

    Thanks you very much.

  41. Silvo, yes just type ‘localhost’. That name always refers to your own computer. WAMP’s online mode is to allow external connections. Unless you’ve a good reason for doing this (and understand the security implications) it’s best to keep yourself private from everyone else.

  42. I am now in my second day and many hours of trying to make this work. Have gotten MySQL, WAMP, etc. all installed and configured and all works fine. However I cannot install WordPress. I get a rather large page of gibberish that says WordPress is already installed on my computer. I uninstalled WordPress and then reinstalled it, but still got the same message. I even went through the registry to be sure there was nothing there. Regedit showed no instances of WordPress. I have edited and reedited the WP config file using new users I created for MySQL and still get the same message. I am stumped at this point.

    The curious thing is I have WP installed on my web host. The fabled five minute install was just that. I was wanting to use this setup so I could experiment with things before posting them. Is it possible the web host installation is causing problems? I decided not to try to download my web stuff just so it would not complicate things and my desktop install would be clean.

  43. Spent ANOTHER wasted day on trying to get WP to work. Not fun. This time downloaded the entire site from my server as per instructions. Local access works fine, but I canno0t get WP to work. O keep trying to download the apprpriate databse files, they create a SQL file, but that is as far as I can get. There is an interesting entry in the tutorial. It says: “You will be presented with a screen where you can execute SQL commands or load them from a file. We want to do the later, so select the file you’ve just downloaded and press go:” On my computer there is not such screen. When I acces my database or any other database I get an entirely sifferent screen when I hit the SQL tab. It is a gray box that says: “Run SQL query/queries on database.” There is no screen about executing SQL commands from a file. Is it possible my WAMP or MySQL files are corrupted?

    Contrary to what many have said a warning to those who have yet to try this. I have over 20 years experience in building computers, designed several databases on state grants, designed websites since back in the day where you had to know HTML because there were no programs like Front Page. Also have wo9rked with some wierd modeling and other programs and done a bit of hacking. I also trouble shoot computers and do tech support. I would say this is the single worst experience I have ever had with a piece of software. Nothing else is even close.

  44. After over 20 hours of trying the techniques described here I quit and started looking for an alternative. What I found took me little over an hour (they say it can be done in ten minutes–I had some issues with XPpro and IIS–something not even mentioned here). It works slick, enabled me to download all my web themes and revise them plus has a much better interface fot MyAdmin. Bottom line: DO NOT use this site or WAMP instead go to: http://www.tamba2.org.uk/wordpress/xampp/. This site has it all including a slick installation that allows you to put WP on a USB dirve so you can move it from machine to machine. There has been much blogger chat on what is known as the stick installation.

    The main difference is Tamba2 uses a program called xampp lite, which is a cinch to install. He also includes some much clearer instrictions with a lot more pictures. Unfortunately I only recently found xampp is the recommended installation on the Word Press Codex. See: http://codex.wordpress.org/Getting_Started_with_WordPress#WordPress_for_Beginners If you want to save yourself the weekend I just wasted on this program go the tamba2 and skip this mess.

    As a long time programmer and also techical writer the main fault with Urban Giraffe’s pages are that they are VERY unclear about directory placement (a major sin) plus they fail to catch several crucial problems such as XP’s use of IIS. I spent some bucks on the manual, but luckily ordered the pdf file. Had I spent $12 on the hard copy I would not be a happy camper.

    For newbies to WordPress this is an excellent example of doing further research and not depending on a few notes. I ended up here due to a post to me on the WP website. I intend to let that gentleman know his advice was not very good.

    Happy blogging and don;pt make the same mistake I did. Part of the beauty of the web is that it can get people out of potential trouble and alert them to bad solutions.

    Urban Giraffe, I am sorry to have to write this, but your instructions are obsolete and rely on the wrong program. WAMP sucks next to Xampp. No comparison.

  45. Dear frustrated,

    Thank you for your blanket warning of my site. I’m sorry you had such a bad experience, despite your multitude of experience.

    The instructions presented here are indeed out of date (the post was made over a year ago). Much has changed in that time and this has been detailed several times here. I would like to keep things up-to-date, but not being under the full-time employment of WAMP I do not have the time. As you point out, the beauty of the internet is the wealth of information out there, and this is but one guide, written for one year old software.

    I would be interested to know where you think the instructions are unclear about directory placement. I was very careful, but things may have changed in the intervening time.

    As for IIS, this is not installed by default on XP. There are countless programs that can interfere with Apache (one such is Skype) and I cannot hope to cover them all. As it is unlikely that the average user would install IIS then I see no reason to cover it. I have not yet seen any questions here which would contradict my decision.

    Your opinions about WAMP should ideally be directed to the WAMP website where I’m sure they would be more usefully received.

    To answer your previous questions no, your website cannot affect your local computer. And no, there is nothing in the registry for WordPress – it is a set of text files. I am sorry I could not have helped you further and that you had to publicly demonstrate your knowledge in such a manner. I am, and always have been, willingly contactable for questions and problems with anything presented on this website.

  46. John,

    First off, thanks for this great tutorial! Gives me confidence that I can get WAMP and WordPress up and running on my own.

    Second, as your directions say, I have created my new directory (bigcappy.com) and placed the folder in my root directory (C:wamp/www/bigcappy.com) Yet, whenever I edit the httpd.conf file to include my two virtual hosts, typing “localhost” in my browser, as well as “local.bigcappy.com” (my second host at 127.0.0.1) I can no longer access my WAMP server. I’ve tried looking at the comments to resolve the issue, but none of the solutions in the comments seems to work. Here is what my httpd.conf file looks like in the virtual host section:

    NameVirtualHost 127.0.0.1

    DocumentRoot “C:wamp/www”
    ServerName localhost

    DocumentRoot “C:wamp/www/bigcappy.com”
    ServerName local.bigcappy.com
    ErrorLog logs/bigcappy_error.log

    I’ve tried altering where I place this entry in the config file, only putting one entry in, changing the direction of the slashes and changing the first “Servername” entry to read “Servername local.bigcappy.com.” I looked at the error logs for Apache and bigcappy.com and they both state (after altering the config file to include two virtual hosts) that “Warning: DocumentRoot [C:wamp/www] does not exist” and “Warning: DocumentRoot [C:wamp/www/bigcappy.com] does not exist.” Does adding localhost as a virtual host mess things up in Apache? I’m out of ideas, any help you can provide would be appreciated!

    Thanks in advance!

    Ben

  47. Hi Ben, you’ve missed out a slash in the directory names:

    C:wamp/www

    Should be

    C:/wamp/www

    That should remove the error messages. Having localhost as a virtual host is like telling Apache that it’s your default host, if no other name can be matched.

  48. John,

    That seemed to make a little headway. But now I get this error:
    “Forbidden

    You don’t have permission to access / on this server.

    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.”

    Is there a permission setting that I have to enable in Apache or Windows XP Pro? Some of the stuff I’ve been reading seems to point to this, but I haven’t found a definite solution.
    Thanks once again,

    Ben

  49. Your instructions were good. I understand that they are a bit out of date but with a bit of thinking you can fill in the blanks, for example, with the new WAMP version the location of config.inc.php is located directly under the WAMP folder (if you kept the default folder name the same).

    Thank you for taking the time to give us this information and the patience in answering everyone’s questions.

    Now I’m ready to move on to your Template Tutorial! 🙂

  50. **correction** the config.inc.php file is located directly under wamp\phpmyadmin (not under the www folder)

  51. OK, I spoke to soon. I still mean the compliments. However I had installed a clean WP without any problems. Later I decided to install my site on my computer. I received no errors except when I get to the login page.

    On the top half of the page BEFORE loggin in I get this error:

    “Options saved.
    ‘; } $checked = ”; if($ping == 1) $checked = ‘checked=”checked”‘; echo ‘
    URIs to Ping

    The following services will automatically be pinged/notified when you publish new posts or drafts. Not when you edit previously published posts, as WordPress does by default.

    NB: this list is synchronized with the original update services list.

    Separate multiple service URIs with line breaks:
    ‘.$uris.’

    Ping services”

    AFTER I login I am getting this error:
    “Options saved.
    ‘; } $checked = ”; if($ping == 1) $checked = ‘checked=”checked”‘; echo ‘
    URIs to Ping

    The following services will automatically be pinged/notified when you publish new posts or drafts. Not when you edit previously published posts, as WordPress does by default.

    NB: this list is synchronized with the original update services list.

    Separate multiple service URIs with line breaks:
    ‘.$uris.’

    Ping services

    ‘; } # the actual pinging function SUP_ping($id) { global $wpdb; if(get_option(‘SUP_ping’) == 1 and get_option(‘ping_sites’) != “”) { # fetches data directly from database; the function “get_post” is cached, # and using it here will get the post as is was before the last save $row = mysql_fetch_array(mysql_query( “SELECT post_date,post_modified FROM $wpdb->posts WHERE id=$id”)); # if time when created equals time when modified it is a new post, # otherwise the author has edited/modified it if($row[“post_date”] == $row[“post_modified”]) { if(SUP_DEBUG) addtolog(“pinging (new post)”); # uses the built-in generic_ping function from functions.php generic_ping(); } elseif(SUP_DEBUG) addtolog(“NOT pinging (edit)”); } elseif(SUP_DEBUG) addtolog(“NOT pinging (disabled)”); } # when publishing a draft the post_date and post_modified will not be equal, # but we should ping nonetheless. # the above SUP_ping function will be called after this one, # but the post will then be considered an edit and there will not be duplicate pings. function SUP_ping_draft($id) { if(get_option(‘SUP_ping’) == 1 and get_option(‘ping_sites’) != “”) { if(SUP_DEBUG) addtolog(“pinging (draft)”); # uses the built-in generic_ping function from functions.php generic_ping(); } elseif(SUP_DEBUG) addtolog(“NOT pinging (disabled)”); } # for debugging function addtolog($line) { $fh = @fopen(ABSPATH.”smart-update-pinger.log”, “a”); @fwrite($fh, strftime(“%D %T”).”\t$line\n”); @fclose($fh); } # adds some hooks # shows the options in the administration panel add_action(‘admin_menu’, ‘SUP_add_options_page’); # calls SUP_ping whenever a post is published add_action(‘publish_post’, ‘SUP_ping’); # calls SUP_ping_draft when changing the status from private/draft to published add_action(‘private_to_published’, ‘SUP_ping_draft’); # stops the built-in pinging remove_action(‘publish_post’, ‘generic_ping’); # activates pinging if setting doesn’t exist in database yet # (before the user has changed the settings the first time) if(get_option(‘SUP_ping’) === false) { update_option(“SUP_ping”, 1); if(SUP_DEBUG) addtolog(“enabling ping by default”); } ?>
    Warning: Cannot modify header information – headers already sent by (output started at C:\wamp\www\memoir\wp-content\plugins\smart-update-pinger.php:1) in C:\wamp\www\memoir\wp-login.php on line 9

    Warning: Cannot modify header information – headers already sent by (output started at C:\wamp\www\memoir\wp-content\plugins\smart-update-pinger.php:1) in C:\wamp\www\memoir\wp-includes\pluggable-functions.php on line 274

    Warning: Cannot modify header information – headers already sent by (output started at C:\wamp\www\memoir\wp-content\plugins\smart-update-pinger.php:1) in C:\wamp\www\memoir\wp-includes\pluggable-functions.php on line 275

    Warning: Cannot modify header information – headers already sent by (output started at C:\wamp\www\memoir\wp-content\plugins\smart-update-pinger.php:1) in C:\wamp\www\memoir\wp-includes\pluggable-functions.php on line 247″

    Please tell me what is going on here. Thank you.

  52. I figured it out. It was a plugin. I removed the plugin from the plugin directory. I am logged in without errors.

  53. I thought I would just add a further comment to Rosh’s point up above.

    I also had problems with my test.php file not redirecting to my php.info file. As Rosh pointed out, this is because my local.mysite.com folder (“C:\wamp\www2”) was located in a different directory to my localhost folder (“C:\wamp\www”).

    I tried following Rosh’s instructions but got really stumped. After I followed his instructions to edit the httpd.conf file, my WAMP wouldn’t restart properly. I’d only get 1 out of 2 services running, and needless to say the test.php file still wouldn’t work.

    Then I realised: the speechmarks (“) in Rosh’s post are slightly different from “regular” speechmarks. When you copy and paste Rosh’s modifications into httpd.conf, look carefully and you’ll see that the speechmarks are ever-so-slightly different.

    The simple solution: delete the speech marks, and retype them in. Save the httpd.conf file, restart WAMP, and it should work.

    Here’s Rosh’s httpd.conf modifications reproduced, with the speech marks clearly marked out with []. Replace each [“] with a regular “.

    DocumentRoot [“]C:\Development\Projects\atastandstill\www[“]
    ServerName dev.atastandstill.com
    ErrorLog logs/atastandstill_error.log

    AllowOverride all

  54. Argh, not exactly sure why but WordPress modified the code in my comment so it’s not showing up properly. Go to Rosh’s second comment and modify the speechmarks in that.

  55. This is very cool indeed. A note to a previous post about XAmp. I just removed it and everything associated with it. It would not let me login and I got no help when I asked.

    This Wamp install went very smoothly. Now – I am to the install WordPress. When I run install.php it returns a message that there is no config.php. Well – yes there is. I’ve installed WordPress on several servers and I know about the config.php file. It really is there. I am stumped.

    Cathy

  56. Sorry Cathy, missed that one. Have you tried seeing what happens if you create another config.php through WordPress? It seems confused and what it tries to do next may highlight the problem

  57. John,

    I like what you’ve done, and was inspired by your guide to switch from xampp to wamp. There is an “Error establishing a database connection” from WordPress.

    My set up is virtual hosts with the aim of editing test versions of my sites on my local computer.

    I’ve gone through your guide twice and read your responses to the comments. I’ve doublechecked matching passwords, etc., but no matter what, the error is there. Any suggestions?

    J

  58. Followed your advice to Knot and changed to empty password.

    Now the WordPress “can’t connect” error has been replaced by a “can’t select database” error.

    Know how to make it work?

  59. This post rocks. Thanks! I’ve used it to successfully install WordPress on my local machine (for plugin development, etc.) as well as on a USB drive 🙂

    Thanks again!

  60. I (seemingly) had no problems at all following your instructions to install and configure WAMP, it’s installing WordPress that’s the problem for me, and I had the exact same problem when I tried to do it with XAMPP, I have no idea what i’m doing wrong.

    When I run install.php, I fill in the fields in step one, and press “continue to second step”. Then, the next screen states:

    “Now we’re going to create the database tables and fill them in with some default data”

    and that’s it. It’s supposed to give me a username and password, right? Because it doesn’t. My browser’s progress bar stays half full, as if the page is still loading, and absolutely nothing else happens on that page, no matter how long I wait. I looked in phpmyadmin and some tables have been created in the database, but still I don’t have a username and password for wordpress. If I try refreshing the page, it says:

    “You appear to have already installed WordPress. To reinstall please clear your old database tables first.”

    Any idea where it’s going wrong? This is driving me mad. Greymatter was so much easier than this!

  61. Well, I’ve followed the tutorial so far and even read through all the comments, but I still can’t get test.php to work. The phpinfo.php file works fine, and everything else up until creating the .htaccess file has worked as well. I’m sure I copied the correct information into .htaccess, but test.php doesn’t work. Any ideas?

  62. Ryan,

    That kind of confused me too. Rename the file “test.php” and put it in your www/wonderfulsite.com. Then from your browser, type in:
    “http://local.wonderfulsite.com/test.php”

    Of course, change the url to reflect your own setup.

    Regards,

    Alan

  63. Hi,

    I’ve been trying to install wordpress on my pc without success, I’ve tried with both WAMP and XAMPP, and neither of them works for me. The problem I have is that I can’t go beyond step 2. I mean, I install the program (it runs ok, both Apache and Mysql) buth I can’t access Localhost on the browser. I don’t have ISS installed, have the XP firewall and Filseclab installed, but they’re disabled since I don’t have a connection at home, I’ve checked the port but nothing is using it… I think that’s all.

    I’ve tried to make an installation on my USB drive following the wordpress codex tutorial and everything went ok, but, when I tried to use the installation on my pc, I had the same problem (can’t access localhost, I get the classic “site not found” on both explorer and firefox) If it helps, when I run the webserver on a stick program on my pc, I get randomly a “Apache not working” or a “Mysql not working” message. That applieas also with Xampp. Only WAMP has both services working correctly.

    Thanks for you time.

Leave a comment

Your email address will not be published. Required fields are marked *