Solution: WordPress Nice Permalinks Not Working With ApacheBy angsuman, Gaea News Network
Monday, November 16, 2009
WordPress nice permalinks is a way to create search-engine-friendly url’s for WordPress posts and pages. Unfortunately they sometimes do not work out-of-the-box even after choosing your permalinks structure in WordPress options. I have found the issue in Cent OS 5 as also in Fedora versions before.
First check whether your .htaccess file is present in WordPress root directory and writable by apache user. If not fix it by using chmod command and update the permalinks structure again. This should take care of the problem. If that is not the issue then read on for the other most common issue.
Open httpd.conf file and search for AllowOverride. httpd.conf is most likely located in /etc/httpd/conf directory.
Leave the first match intact and go for the second one. You will find an entry like:
Change it to:
Alternateively you can use:
Now restart the web server. On Cent OS and Fedora that would be:
service httpd restart
Your permalinks should now be accessible.
AllowOverride controls whether .htaccess files are processed per directory. They have a performance impact and hence you can only enable it just for your WordPress directory. Read the fine Apache httpd manual more details or just look into the conf file for examples on how you can do it.
You can know more about nice permalinks in WordPress here.
Tags: Cent OS, Cent OS 5