WordPress 403 Forbidden when viewing category

Today I came across one of my sites which for some reason was displaying the homepage OK, but when I clicked on the category view (or any post for that matter) it returned an error 403.

You don't have permission to access /category/uk-road-tripping/ on this server.

I googled and tried a few things, but in the end I solved it by changing the file permissions on my public_html folder using an FTP client.

Somehow, the folder had been set to 711 permission. I changed it back to 755 and that solved it. Also, just check the permissions for index.php – that will need to be 755 too.

Hope this helps someone!

UPDATE October 2016: I also found that you can get this error if you have a folder with the same name as your wordpress URL. For example, yourdomain.com/files/test.pdf – if you had a category or a page on your wordpress site called “files” then it’s not going to know what to do. I found that apache wanted to first check the folder on the server, so wordpress never got a look in. I renamed my page on the site to get around it. The best thing would be to have a folder on your server with a random name and serve static files from there.

Leave a Reply

Be the First to Comment!

Notify of