I installed a fresh WordPress on a brand new VPS. No matter how I change the settings of permalinks, it is always giving me 404 error for all pages except Homepage.
Later I google it and find the solution from the official site.

* Apache web server with the mod_rewrite module installed
* In WordPress’s home directory,
o The FollowSymLinks option enabled
o FileInfo directives allowed (e.g. AllowOverride FileInfo or AllowOverride All)
o An .htaccess file (if this file is missing, WordPress will try to create it when you activate “pretty” permalinks)
o If you want WordPress to update the .htaccess file automatically, WordPress will need write access to the file.

For my situation, it is because of options of Apache.
I edited the httpd.conf and added following options.

FollowSymLinks
AllowOverride All

Then apply the changes and it works.
My URL looks like: http://www.mysite.com/food/delicious/

David Yin

David is a blogger, geek, and web developer — founder of FreeInOutBoard.com. If you like his post, you can say thank you here

Leave a Reply

Your email address will not be published. Required fields are marked *