We recently made some changes to the layout of our blog. In doing so, we chose to enable something other than the default permalink structure and suddenly we couldn’t see any pages. After a bit of searching, I stumbled across the fact that it was this change that was making things go awry.
But why could I get the other settings to work?
A few things that need to be in place when you want to use a different setting:
- Ensure that mod_rewrite is enabled. This will be in your httpd.conf file
- Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines)
- Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound ‘#’ sign from in front of the line)
- Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.
- Also, need to check that the individual .htaccess files you have out there are enabled. If AllowOverride is None then they won’t get picked up
<Directory />
Options FollowSymLinks
AllowOverride All - Should also enabled in the web directory specifically
<Directory /var/www/html>
AllowOverride All
</Directory>
Your mileage may vary based upon the server/host/etc you use but this should get you most of the way there.
In order for wordpress to use the permalinks capabilities, you also need to make sure you have a .htaccess file in your /wordpress root. If there isn’t one there, log in via shell to that root and do ‘touch .htacess’. Ther perms should be 755 at least. When you go to the Settings->Permalinks page on your WP Admin, hitting the Save Changes button will cause the mods to get written to this file.