WordPress Fancy Permalinks not working Giving 404 error



I spent the better part of a Friday night sorting this out. I had just launched 4 new wordpress blogs that were secondary installs on each server. (I use a VPS and /home/domain/www/ was the primary wordpress install – the secondary installs existed at /home/domain/www/secondsite ) . The problem was that I switched on the fancy permalinks in the control panel of wordpress and after that nothing worked but the main page. Setting things back to the default I could see posts, but not the feed or anything else that relied on mod_rewrite.


Everything else gave the server generated 404 error page. I started by comparing .htaccess files they seemed fine. Then I disabled all the plugins and switched back to the default theme. That didn’t solve things. I disabled and re-enabled the pretty permalinks THAT didn’t work. I started nosing around the VPS’s /etc/httpd/conf/httpd.conf file and made sure mod_rewrite was there (of course it was because the pretty permalinks work on the /home/domain/www install of wordpress…)

So, the fix is to have a directory entry for that folder with AllowOverride ALL to allow the .htaccess to override the default settings. (Or change the default folder settings for apache to allow overrides.) It has to be done in .htaccess

An example of setting the default to allow overrides (allow .htaccess “stuff”) is….

<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>

You can use that template to specifically allow that for your chosen directory and hopefully not have the hair pulling evening that I did.

   Send article as PDF   

Similar Posts