In order to enable clean URL’s in worpress by altering permalink settings, apache webserver needs to be configured to allow URL rewrites.

First load the URL rewrite module in apache with the following command.
sudo a2enmod rewrite

Once you have enabled the URL rewrite module in apache, you will then need to configure the URL ReWriteEngine either by using an .htaccess file or simply by inserting the necessary directives in a <Directory> section in your main configuration file. Adding the config directly into your apache webserver configuration file will result in less of a performance hit, as the config is loaded once when apache starts rather than every time a file is requested.
<Directory /path/to/wordpress>
RewriteEngine On
ReWriteBase /path/to/wordpress
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Finally reload your apache configuration with the following command.

sudo apachectl restart

You should now be able to alter your worpress permalink settings from the wordpress admin page.

2 comments so far

Add Your Comment
  1. Well done Spotty!

  2. Very helpful