I am designing a wordpress theme on my computer for a company. I have wamp installed. I went into the admin area and changed my permalink to custom using /%postname%/ So now when I go to add a page and I type the name of the page, it shows up underneath the page title with the correct link structure and the edit button appears to change the link. This is all good. That’s what I would expect. But when i go to the homepage and click the about button, or contact or anything else. I get an error saying "the requested url was not found on the server" Any ideas?
This usually indicates an apache configuration problem. Here’s my 3 step patent pending guide :mrgreen:
1) Check that WordPress has created a .htaccess
This should be in the same directory as the wordpress index.php file, if WordPress can’t write to the folder however it won’t be created. If it’s not there then the best bet is to check the file permissions on the folder and ensure the apache user can write to the directory.
2) Check that .htaccess is enabled in the apache config
There’s various places that the apache config can live. Sometimes it’s called apache.conf, apache2.conf, httpd.conf, basically look for a .conf file open it in a text editor. What you need to find is the <Directory> section for the web root directory (i.the directory where the files for http://localhost/ are stored which is usually called wwwroot or htdocs). You are looking for a line here that says:
This means .htaccess has been disabled. Since it’s a development server it’s safe to set AllowOverride All and save the file. Restart apache and see if the permalinks are now working.
3) Check that mod_rewrite is enabled in apache
Fancy permalinks require mod_rewrite in order to do their magic. If the above doesn’t fix the problem you may not have mod_rewrite support enabled. It’s back to apache config for this one, this time looking for a line like this:
#LoadModule rewrite_module modules/mod_rewrite.so
If the # is there at the beginning of the line it means it’s disabled so remove the # and save the file. Restart apache server and try it again. Hopefully, it should now be permalink city :)
Let me know if that does the trick for you
i don’t believe i am using apache. I am not all that familiar with the technology, but it’s wamp. on a windows xp computer. is there apache in that? I found that if I create the pages without using /%postname%/ then it works fine. when I change the permalinks to postname, it fails to make the page.
wamp has apache – windows, apache mysql, php – so if you want to get it working without the index.php then maybe try those suggestions.
I didn’t know you could put index.php/your-blog-post in wordpress, as I have only seen that on expression engine before. It’s worth knowing – I learn something new everyday :)
every change I made to the .conf either made the localhost crash or the site crash. Option 3 above gave me an error saying unable to establish a database connection, option 2 make the localhost stop responding and option 1 was a no go because the .htaccess file is already there. I didn’t need to do anything.
in your main setting of wordpress, have your url ending something like blog/ instead of blog/index.php
blog is just a directory name, you could have anything here…
another thing I noticed with wp2.6 is if it is not live yet, and your happy with the theme, delete your database and start again, upload the theme, then set it, then make your permalink before you start posting.
Sorry it’s causing you so many problems – I think this is why I stopped using WAMP and moved to LAMP.
Anyway, it’s good the .htaccess was created, that’s one problem less. Are you saying that your directory has AllowOverride None and that mod_rewrite is disabled in your current setup and that changing either of these causes the server to crash?
Also, what WAMP are you using? Is it one of the preconfigured packages (wampserver, xamp) or did you roll your own? If I can download the same one I’ll stick WordPress on it and see what happens.
The issue with WAMP is that some software is written for Linux and then ported to work on Windows. This can introduce some ‘quirks’ when using the Windows version.
According to WordPress.org:
If enabling mod_rewrite in Apache causes crashes then you can’t use permalinks. Unfortunately without more information about your setup I can’t deduce why enabling mod_rewrite caused you to get the errors you did.
You must be logged in to reply to this topic.