Monday, July 31, 2006

There doesn't seem to be a wp-config.php file

I had trouble installing WordPress last week even though I had done it without trouble the week before. I kept getting the following error:

There doesn't seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.

I did a search on this error and there seemed to be quite a few people with the same problem. This even came up on the WordPress support site but no one had a definite response. It took me pretty much all day but I figured out what the problem was.

For me the problem was that I renamed wp-config-sample.php file in Dreamweaver just by clicking on the filename and renaming it. This is a mistake as you should open the file, edit it, and then select File / Save As. The other problem with using Dreamweaver is that when you rename the file, it asks if you want to update links. I think I said yes when I should have said no. Also I moved the files from the 'wordpress' folder into my root directory using Dreamweaver. Again it asked if I wanted to update links and I said yes, which I think was wrong.

I'm not sure which of these things I did was the problem but the solution was simple. I deleted everything from the server and started the installation process from the beginning. I unzipped the file and opened the wp-config-sample.php file using Notepad. I edited it and then selected File / Save As and saved it as wp-config-php, not forgetting to save it as a .php file. I then moved all the files and folders into the root directory of my site using Windows Explorer, NOT Dreamweaver. I uploaded everything to the server and, voila!, it worked.

No comments: