Wordpress permalink error resolved.
Just a quick post to let you know of a solution to a problem i have encountered twice now when developing on clients servers over which i have no real control.
The issue arises when using WordPress and turning on ‘permalinks’, suddenly nothing works and you are shown a blank white page with the following error:
Forbidden, perhaps you need to change the file permissions for this document or upload an index page.
Now first things first, ..always check you have a .htaccess file at the root of your wordpress folder (you may need to refresh your file view as WordPress may have only just created it).
Assuming you are using the /%postname%/ custom link structure as i was your .htaccess file should look like this (this also assumes your WP installation is in the root directory of your domain, ..but this doesn’t really matter WP generates this code for you automatically anyway):
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
So assuming you have this correct permalink .htaccess file content and then like me it is still not working, …just add these two magic lines to the top of the file:
Options -Indexes
Options +FollowSymLinks
Now your completed .htaccess file will look like this:
Options -Indexes
Options +FollowSymLinks# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
…and work perfectly.
cheers – works a treat
Great post. Fixed my problem. Thanks
Why can’t they spell it out in the help documents like this… eureka, many thanks!
..because it is a server issue, ..well not issue, ..but ‘issue’ :) …it never happens on my mediatemple servers, ..only occasionally on clients server.
I am sure there is a fix i could implement that mean’t speaking to a disgruntled server admin in a small air-conditioned box in the basement of their offices …but i prefer this method.
Happy to help.
I have tried it. I uploaded it with the ftp program but, it still won’t work. when i tried to open it, it was blank white, same as before. Is it caused by the cache??
It should not be caused by the cache no, ..please let me know the following:
- does it work with permalinks turned off?
- if you put the following in your .htaccess file does it redirect to google (replace everything, ..it is just a test to see that your htaccess file is working)?
redirect 301 / http://www.google.com/
Let me know your findings,
Sorry for the delay in my responses, i am on an african island with no electricity until thursday.
Thanks dude. Fixed my problem when hosted on 123-reg.co.uk
Thank you! It worked perfectly!