4 Ways To Fix 403 Forbidden Error in WordPress
4 Ways To Fix 403 Forbidden Error in WordPress.
Are you dealing with the 403 Forbidden error on your WordPress site? It is one of the most dreadful errors that a WordPress users can come across. In this article, I’ll show you how to easily fix the 403 forbidden error in WordPress.
Just few days back, I experience 403 error on some post on my site, according to my Yoast SEO plugin report. This however made me to do a deep research why the error and how I could solve the error. Thought most times it could be from your serve, but most error in WordPress is due to poorly configured security plugins you may have install to get some advance feature on your WordPress site, but not until I take you through how to solve this error, don’t make a conclusion yet.
What do I do when there is 403 error consistently?
Do you go panicking?
Do you consider selling the blog/site because you don’t know what to do?
- I am sure You are transform by the information you get through me, I am also sure you can be part of our daily updates. why not leave your email behind let me keep you informed with information, jobs and inspire you always.
Beside, anyone owning a website could be in such situation and if not properly fix you may wonder why search engine is not crawling your site, is simply because a plugin is stopping your readers from accessing that file/post. So, today on this post, I’ll walk you along 4 ways to fix 403 forbidden error in wordpress.
Though it may look technical, but the ability to solve problems is reasoning to find solution.
Also read: How To Install WordPress On Localhost
What is a 403 Access Denied Error in WordPress?
WordPress shows codes and messages when an error occurs on your website.
Types of 403 Error that could occur
1. 403 Forbidden error code is shown when your server permissions don’t allow access to a specific page.
2. 403 Forbidden error was encountered while trying to use an Errordocument to handle the request..
3. 403 Forbidden – Access denied on wp-admin or WordPress login page.
4. 403 Forbidden – during WordPress install.
5. 403 Forbidden error when visiting any page on your WordPress site.
6. You may also see ‘Access to yourdomain.com was denied. You don’t have authorization to view this page.’
Now that you know about the different types of 403 errors, let’s talk about what causes this error.
403 Forbidden Causes Error in WordPress
The most common cause for the 403 Forbidden error in WordPress is due to poorly configured security plugins. Many WordPress security plugins can block an IP address (or a whole range of IP addresses) if they believe them to be malicious.
Another possible Caused by a WordPress Plugin, .htaccess file, incorrect file permissions and ownership errors on your server, No index page and Empty httpdocs directory.
Having said that, let’s take a look at how to solve 403 forbidden error in WordPress.
Fixing 403 Forbidden Error in WordPress
Before you do anything, I will always recommend that you create a complete WordPress backup of your website to avoid story that are painful, or ask your host service to send you a backup of your files, or however, if they can do the backup, inform them to. Here is our guide on how to manually create a WordPress backup.
1. Fixing 403 Forbidden Error Caused by a WordPress Plugin
First thing you need to do is to temporarily deactivate all WordPress plugins. This includes any security plugins that you may have installed on your site. If this resolves your problem, then this means one of the plugins on your website was causing this error.
You can figure out which plugin was causing the error by activating all your plugins one at a time until you are able to reproduce the 403 forbidden error.
2. Fix 403 Forbidden Error Caused by Corrupt .htaccess File
403 error is caused by a corrupt .htaccess file in your WordPress site. Repairing this file is quite easy.
First you need to connect to your website using a FTP client or file manager in cPanel.
Next, locate the .htaccess file in the root folder of your WordPress site. See this guide if you can’t find .htaccess file in Your WordPress folder. You need to download the .htaccess file to your computer so that you have a fresh backup of it. After that, you need to delete the file from your server.
Try accessing your website. If 403 forbidden error is resolved, then this means that your .htaccess file was corrupt.
You can generate a fresh .htaccess file by logging into your WordPress admin area and going to Settings » Permalinks page.
Simply click on the Save Changes button at the bottom of the page and WordPress will generate a fresh .htaccess file.
Also check: How To Use Plugin In WordPress
3. 403 Error Caused by File Permissions in WordPress
All files stored on your website have file permissions. These file permissions control who can access files and folders on your website. Incorrect file permissions can cause 403 forbidden error. It makes your web server thinks that you do not have permission to access those files.
If the above two solutions do not solve the 403 forbidden error on your site, then incorrect file permissions can be the most likely cause. You can ask your WordPress hosting provider to check your website for correct file permissions.
Changing file permissions, yourself can have serious consequences. If you do not feel you can do it, please hire a professional.
However, if you want to do it yourself, then here is how you would check your file permissions. Simply connect to your WordPress site using an FTP client. Navigate to the root folder containing all your WordPress files.
Click to select a folder, right click and then select File Permissions from the menu.
Your FTP client will show you a file permissions dialog box like this:
- All folders on your WordPress site should have a file permission of 744 or 755.
- All files on your WordPress site should have a file permission of 644 or 640.
You can set the file permission to the root folder to 744 or 755. Check the box next to ‘Recurse into subdirectories’ and then check the option that says ‘apply to directories only’.
- Click on the OK button. Your FTP client will now start setting permissions to all subdirectories in that folder. Once it is done, you need to repeat the process for all the files. This time you will use file permission of 644 or 640 and don’t forget to select ‘Recurse into subdirectories’ and ‘apply to files only’. options.
- Click on the OK button and your FTP client will start setting file permissions for all the selected files. Try accessing your website now, and 403 forbidden error should be gone now.
4. Empty httpdocs directory
Most times empty httpdocs directory could lead to 404 error. To solve this make sure that your website content has been uploaded to the correct directory on your server. Remember to replace example.com with your own domain name.
1. DV server: /var/www/vhosts/dv-example.com/httpdocs/
2. When you connect with your FTP user, you just need to navigate into the httpdocs directory.
If this folder does not exist, feel free to create it.
I hope this article helped you fix the 403 forbidden error in WordPress. You may also want to see our expert tips and hacks to protect your WordPress admin area. If you liked this article, then please like Hkitnob page on Twitter, Linkedia, Istagram and Facebook, or subscribe to receive our daily mail update.