Self-Hosted WordPress Permalink Problems – set AllowOverride all

WordPress uses .htaccess to manipulate how Apache serves files from its root directory, and subdirectories thereof. Most notably, WP modifies this file to be able to handle pretty permalinks. However, Apache must allow the use of .htaccess files in order for WordPress to use the file. Set the parameter ”AllowOverwrite” of the file ”apache2.conf” file to ”All” in order to tell Apache to allow the use of .htaccess files.

You can find the file under /etc/apache2/apache2.conf and manipulate it with nano /etc/apache2/apache2.conf.

Find the following lines in your apache2.conf

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

and change it to

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

Finally, you need to restart Apache.

service apache2 restart

Hopefully you were able to solve you permalink problems by now. Otherwise move to point 4 of the checklist.

Checklist

  1. .htaccess must be present in the same folder as index.php
  2. .htaccess be writeable
  3. apache2.conf must allow overwrite
  4. database problems

 

One thought on “Self-Hosted WordPress Permalink Problems – set AllowOverride all”

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.