Category Archives: Uncategorized

Forbidden 403 Error

When you get the 403 Forbidden Error and you can’t access any of your WordPress site, it is probably because the .htaccess file has been corrupted or is missing the “Options +FollowSymlinks” line at the top of the .htaccess file.

Backup your .htaccess file by changing it’s name to something else. Try to get into your WordPress site now. If you site does display, the .htaccess was the problem.

To create a new .htaccess file go into the Settings and use the Permalinks selection process. This may well break it again but it will create a valid .htaccess file.

If the problem is back after setting up the Permalinks the “Options +FollowSymlinks” line needs to be added to the .htaccess file right after the “<IfModule mod_rewrite.c>” line.

It should look like the following.

<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]

What to do when Permalinks don’t work

I recently had a problem when setting up a new WordPress development environment on my local PC. The installation went fine. I selected Permalinks. I manually updated the .HTACCESS file to include “Options +FollowSymlinks”. I did the normal things and Permalinks just wouldn’t work. The problem ended up being that the “rewrite_module” in Apache was not enabled. I used Webmin to go into the list of Apache Modules and enable the “rewrite_module” and all is good now.

Can’t Update WordPress or Plugins

I have recently had problems updating WordPress and Plugins on a number of my sites, getting caught up having to setup ftp accounts to allow the updates.  In search online I found a very simple solution.

In the wp-config.php file add the following line”

define('FS_METHOD', 'direct');

That fixed the problem for me.



Getting 404 Not Found after Permalink change

To allow the .htaccess file to override standard website configs, start by opening up the configuration file. NB: You will need sudo privileges for this step.  You may see a file in the sites-available directory for the website that you have created.  If this is the case, edit the file for your website rather than the default as shown in the example below.

sudo nano /etc/apache2/sites-available/default

Once inside that file, find the following section, and change the line that says AllowOverride from None to All. The section should now look like this:

 <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all

After you save and exit that file, restart apache. .htacess files will now be available for all of your sites.

sudo service apache2 restart

Copyright © 2024