Schemaninja logo

How to Fix the 403 Forbidden Error in WordPress?

Affiliate disclosure: In full transparency – some of the links on our website are affiliate links, if you use them to make a purchase we will earn a commission at no additional cost for you (none whatsoever!).

I’ll make this simple and straight enough, this piece is going to be about How to Fix the 403 Forbidden Error in WordPress. It’s one of the most common and encountered problems with websites.

So I think it’s only a fair decision for me to scribble this piece down on HTTP 403 forbidden error, right? Well before diving into the technical details, let’s get down to some basics.

Here’s what this piece would be covering:-

  • What is the 403 Forbidden Error in WordPress?
  • Why does the error code 403 occur in the first place?
  • How do you fix a 403 forbidden error?

What is the 403 Forbidden Error in WordPress?

403 is an error code, it species which error exactly is causing the problem. Just like the popular 404 not found code, the 403 means a lack of permission.

Means when you don’t have enough permissions to access a certain file, you get that problem. It’s primarily a fail-safe, designed to keep unwanted people from accessing unwanted data.

But then it’s  an algorithm, a code, right? And codes mess up sometimes, or/and you do. And in those instances, you might have this problem on your server even when you do have sufficient permissions.

And that’s exactly what we would fix today!

Why does the Error Code 403 Occur?

Now there are plenty of reasons and times when and why this might happen. The primary reason being, Security plugins! I mean this is something that most website owners install themselves, and that increases the chances of you making the wrong decisions.

There are some plugins, security plugins to be specific which blog your Ip addresses, and couple more addressed due to security. It’s unintentional, but it happens. That’s the reason you need to be really picky with which plugins you’re granting access to your site.

The second most common reason for this to happen is, you’ve got the wrong piece of code on your .htaccess file! The code probably is limiting your rights and access to the server.

Or you might have just messed up some other important kind of file, whatever be the reason, let’s take a look at fixing them.

How to Fix the 403 Forbidden Error in WordPress:-

The first step? I’d say take a backup of your WordPress directory right away! You don’t want to be stranded just in case something goes wrong, right?

So okay once you have the backups with you, it’s time to get to the real deal!

Method #1:- Disable All WordPress Plugins (Especially the security ones!).

http-403-forbidden

Head over to your WordPress dashboard, and click on Plugins> Installed Plugins.

Click on the checkbox at the very top! I mean the very first checkbox! This will select all the checkboxes in the least.

http-403-forbidden

And click on actions> Deactivate.

How-to-Fix-the-403-Forbidden-Error-in-WordPress

This will disable all your plugins! And then check your website. If the issue is resolved, well then you need to re-verify the plugins you’ve installed. I’d recommend permanently deleting any free security plugins you might have.

Method #2:- Checking .htaccess file.

How-to-Fix-the-403-Forbidden-Error-in-WordPress

Login to your Cpanel, and click on File Manager > Public HTML

Then select the website for which you’re having the problem with.

error-403-forbidden

This will take you to the website’s WordPress installation directory. That’s where you find the .htaccess file. Right click on it, and click on delete. (WAIT! Make sure you download it first, as a backup!)

How-to-Fix-the-403-Forbidden-Error-in-WordPress

So once that’s gone, again check your website! If the website starts functioning, then probably you had a line of wrong code in your .htacces! So if that fixes your problem, you still need to get back your .htacess file, right? (It’s important, a lot!)

But you can’t upload the backup file either, because then it would be the same file which caused the issue. So we need a fresh copy of your .htaccess file, right?

Just click on Settings>Permalinks in your WordPress dashboard.

how-do-you-fix-a-403-forbidden-error

And click on Save changes. Nope don’t change anything else! Just get to the page, and click on Save changes.

how-do-you-fix-a-403-forbidden-error

This would generate a fresh copy of your .htaccess file, one “without” the malicious code and hence you’re clean!

Method #3:- Changing File Permissions Manually!

Let me get this straight, this isn’t the best option, or something I recommend either, because if you don’t have clear idea about what file permissions are, or what they can do, you might loose your website permanently.

The best bet over here is to ask your server company or hire a web dev to fix the file permissions for you! But if you’re hell-bent on doing it yourselves, let me show you how (and what!)

Just get to your Cpanel WordPress directory using the steps I’ve shown in the above section. Once you’re in the directory, you should see a screen similar to this.

How-to-Fix-the-403-Forbidden-Error-in-WordPress

Now right click on the file you want to change the permissions of (I’ll show you what to change shortly!), and click on Change permissions.

error-403-forbidden

What to Change:-

  • Set the permissions of all the “folders” in your WordPress directory to 744 or 755!
  • The “files” need to be set to 644 of 640!
error-403-forbidden

Final Words:-

So yeah that was it, folks. On How to Fix the 403 Forbidden Error in WordPress. So now that solved your problems regarding how you can solve your error 403 forbidden too right?

If you’ve got any queries or questions, I’d love to hear them in the comments down there. Or if this piece helped you, a share won’t hurt either.

Aishwar

Aishwar Babber is a passionate blogger and a digital marketer. He loves to talk and blog about the latest tech and gadgets, which motivates him to run GizmoBase. He is currently practicing his digital marketing, SEO, and SMO expertise as a full-time marketer on various projects. He is an active investor in NewSmartWave and ImageStation.

Leave a Comment