WordPress 403 Error
WordPress 403 Error can give you issues when opening your WordPress website. In addition to that, it can even prevent you from having access to your WordPress admin dashboard. In this article, we will show you how to easily fix the 403 Forbidden error in WordPress.
What does Error 403 Forbidden mean?
Error 403 Forbidden is an HTTP response status code. It indicates that the web server understands the request sent, but has refuse to authorize it. This could be due to a permission problem.
The error code message can sometimes vary. So it can appear as "Access Denied", or "You do not have authorization to view this page".
You can know more about the different Error 403 message variations here.
What Causes WordPress 403 Error?
Poorly developed and configured plugins are the most common cause of this error. That is why it is not recommend to use WordPress security plugin. Best to use a good web hosting provider like Greens247 with a web server hard coded with WordPress security in mind. As a result, you do not need to worry about WordPress security or install extra plugins for that.
Other common causes of this error:
- Incorrect .htaccess file configurations.
- Incorrect file or directory permissions.
How to fix WordPress 403 Error?
Before starting this fix, take a snapshot, or a full backup. If your web hosting provider does not provide such feature, it is time to look for a new one. For example at Greens247, all web hosting plans come with JetBackup feature. You can easily create a snapshot or full backup on demand, and restore it if something goes wrong.
Troubleshooting will be in steps until the problem solved. This way we can isolate the root cause of the problem.
Deactivate WordPress Plugins
Find your WordPress plugin directory. For instance, "../wp-content/plugins".
Create a new directory inside it called "disabled". For example, "../wp-content/plugins/disabled"
Start moving plugins from the WordPress plugin directory to the new directory you created, so they can become disabled. For example, move plugins one by one.
Refresh the website or WordPress admin dashboard. If the problem still persists, repeat the above task.
All plugins disabled and the problem is still there, what to do next?
Simply follow the next step.
Create a New .htaccess File
Find the ".htaccess" file in the WordPress root directory, it should be in the same directory as "wp-config" file.
Now let us fix the corrupt ".htaccess" file by generating a new one.
Before starting, take a backup of the ".htaccess" file. Simply make a copy of it as ".htaccess.bak". This way, you can easily return to it when needed.
Clear the ".htaccess" file.
Copy the values below, and past them in the ".htaccess" file.
Save the ".htaccess" file. Test the website, and the WordPress admin dashboard.
The website works, what now? Now you know that the root cause of the WordPress 403 Error was a corrupt ".htaccess" file.
The problem is still there, what to do?
Simply, move to the next step.
File and Directory Permissions
File permissions control who can access files and directors on your website. Therefore, all files and directories have permissions.
Incorrect file permissions can cause WordPress 403 Error. Because, the web server thinks that you do not have permission to access those files.
All directories should have 755 permissions, and all files should have 644 permissions. If you have corrupt file and directory permissions, you will need to recursively change them. This can be difficult using the control panel file manager.
You can use command line in terminal or an FTP software like filezilla.
We will do it using terminal in this example:
Replace "/home/username/public_html" with your web server public directory. The above command will find directories recursively and chmod them. As a result, all directories will have 755 permissions.
Replace "/home/username/public_html" with your web server public directory. The above command will find files recursively and chmod them. As a result, all files will have 644 permissions.
Are you facing problems?
Why don't you buy your web hosting service from Greens247 and contact our support team to migrate your WordPress website for free and get it back online.