Sunday, January 19, 2014

Fixing 'page not found' when using permalink in WordPress (Ubuntu 13.10)

I tried to use permalink in WordPress. WordPress automatically created .htaccess file.

However, when I opened the page, there was 'page not found' error. A few things that I did to fix this problem:

Firstly, run
sudo a2enmod rewrite
Then I restarted the apache
sudo service apache2 restart
Well, I still got the 'page not found' error.

Then, I edited the apache2.conf file. It's located in /etc/apache2/
gksudo gedit apache2.conf
Search for this part on the file
<Directory /var/www/>
 Options Indexes FollowSymLinks
 AllowOverride None
 Require all granted
</Directory>
I changed the AllowOverride from None to All.
<Directory /var/www/>
 Options Indexes FollowSymLinks
 AllowOverride All
 Require all granted
</Directory>
Now, let's restart the apache
sudo service apache2 restart
Now I can open the page with permalink.
Done.

References:
http://www.networkinghowtos.com/howto/enable-apache-rewrite-module-on-ubuntu-13-04/
http://stackoverflow.com/questions/19518907/virtual-host-on-ubuntu-13-10-and-apache-2-4-6

1 comment:

Unknown said...

Thanks! After about two pages of Google searches, this one ended being the answer.