So after moving files and db data from an old ubuntu 10 server to my new ubuntu 12 server, I started testing my websites. As expected, certain things stopped working. I quickly installed the missing packages using apt-get, all looking good except my wordpress permalink feature was still not working.

I checked the AllowOverride in all my setting files under /etc/apache2/sites-available/ . All good. Why??? I also checked my .htaccess in my blog directory, also looking good. My wordpress is working. But as soon as I click on any post or page links, I get a page not found 404 error. I verified this from /var/log/apache2/error.log. Yea, of course, coz the permalink is not working.

OK… before I go crazy… last thing to check… is mod_rewrite enabled? I pulled up my p.php file having only this line phpinfo();. Did a search on mod_rewrite. NOT FOUND. Ha! sigh… so I jumped to /etc/apache2/mods-available, seeing rewrite.load, then jumped to /etc/apache2/mods-enabled, NOT seeing rewrite.load… ok, that’s easy.

While in the directory mods-enabled, make a symlink sudo ln -s ../mods-available/rewrite.load rewrite.load. Then restart apache: sudo service apache2 restart. Bam! Everything working and back to normal!