I recently built this site on a little DigitalOcean.com “Droplet” server and went through the process of manually building a WordPress environment from scratch. It was the first time that I have ever installed WordPress this way and on the whole it went very well. Digital Ocean has published a number of excellent instructional “how-to” documents and the one I followed was “How to install WordPress on Ubuntu 14.04“. The process went very smoothly right up to the point where I changed the Permalink setting so that the URL was build using the Page Name rather that the page number. As soon as I did this the whole system locked up and I kept getting the “403 Forbidden” message no matter what I tried to do.
The problem came down to be the .htaccess file (which is a hidden file found in the root directory of the website) that is generated by WordPress when you make this Permalink change. The generated .htaccess file is :
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
The solution came down to adding an extra line of code in the .htaccess file so that the final file looked like:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Once I added the “Options +FollowSymlinks” line the 403 Forbidden problem went away.