As a premium server management company offering server support services to businesses globally, iDatam often receives queries from clients about resolving the WordPress 403 forbidden error. This article details the common causes and solutions to fix the 403 forbidden errors in WordPress websites.
What You'll Learn
What is WordPress 403 Forbidden Error?
Common Causes for WordPress 403 Forbidden Error
How to Solve 403 Forbidden Error in WordPress?
What is WordPress 403 Forbidden Error?
The WordPress 403 forbidden error is an issue encountered by users when they try to access their WordPress site. It is an HTTP status code displayed by the browser when the WordPress web server does not allow access to the requested page or data. Before discussing solutions, it's important to understand the reasons behind this issue.
Common Causes for WordPress 403 Forbidden Error
-
Incorrect File Permissions
-
Poorly Configured Security Plugins
-
Corrupt .htaccess File
-
Hotlink Protection & CDN Issues
Sometimes, your web host may accidentally change server settings, causing the WordPress 403 Forbidden Error.
How to Solve 403 Forbidden Error in WordPress?
Before starting, ensure to take a complete backup of your WordPress site data.
-
Incorrect File Permissions
Incorrect file permissions can cause the web server to return a 403 forbidden error. Each file and folder on your WordPress server has permissions that establish who can access them. To resolve this, correct the file permissions via FTP.
File permissions are indicated by a three-digit number, defining permissions for the user, group, and others.
-
7: Full read, write, and execute access
-
6: Read and write access
-
5: Read and execute access
-
4: Read-only access
-
0: No access
For example, if the folder permission code is 764:
-
User: Read, write, execute (7)
-
Group: Read, write (6)
-
Others: Read (4)
Steps to Change Directory Permission:
-
Connect to your WordPress site via FTP.
-
Navigate to the root folder.
-
Right-click and select "File permissions".
-
Change the numeric value to 744 or 755.
-
Check the "Recurse into subdirectories" box.
-
Select "Apply to directories only".
sh# Connect to your WordPress website via FTP # Navigate to the root folder # Change directory permissions chmod -R 755 /path/to/your/wordpress/root/
Steps to Change File Permission:
-
Connect to your WordPress site via FTP.
-
Navigate to the file location.
-
Right-click and select "File permissions".
-
Change the numeric value to 644 or 640.
-
Check the "Recurse into subdirectories" box.
-
Select "Apply to files only".
sh# Connect to your WordPress website via FTP # Navigate to the file location # Change file permissions find /path/to/your/wordpress/root/ - type f -exec chmod 644 {} \;
-
-
Poorly Configured Security Plugins
Deactivate all recently installed plugins to check if the error is resolved. If the website works fine, reactivate each plugin one by one to identify the problematic one. Replace it with a similar plugin that functions correctly.
php// To deactivate all plugins, add the following line to your wp-config.php define('WP_DEBUG', true);
-
Corrupt .htaccess File
A corrupt .htaccess file can cause the 403 forbidden error. Download the .htaccess file using an FTP manager and delete the original copy from the server. If this resolves the error, re-upload a clean .htaccess file.
sh# Download and remove the .htaccess file mv /path/to/your/wordpress/root/.htaccess /path/to/your/wordpress/root/.htaccess.bak
If the issue persists, other underlying causes may be present.
-
CDN Issues & Hotlink Protection
Deactivate your CDN temporarily to see if it resolves the error. Hotlink protection can also cause the 403 forbidden error. Disable hotlink protection with your CDN provider or web host if enabled.
Conclusion
This article covers the most common causes of the WordPress 403 forbidden error and the methods to fix it. Incorrect file permissions and poorly configured security plugins are common reasons for this error.
WordPress 403 forbidden error does not arise due to poor server configuration. If you're finding it challenging to resolve the issue, you can seek help from experts at iDatam.
iDatam Recommended Tutorials
Linux
Solving the 5 Most Common Linux Server Problems
Master the art of Linux server problem solving with this comprehensive guide. Learn how to diagnose and fix common server issues including network problems, disk space management, security vulnerabilities, and performance bottlenecks.
Mysql
How To Create a New User and Grant Permissions in MySQL
Learn how to create a new MySQL user and grant permissions with this comprehensive guide. Understand the essential commands, best practices, and troubleshooting tips for effective user and permission management in MySQL.
Control Panel, Security
Plesk Server Security Tutorial: A Step-by-Step Guide to Secure Your Web Infrastructure
Secure your Plesk server with our in-depth tutorial! Learn step-by-step techniques, from updates and advanced configurations to code-level protections and emergency strategies, to fortify your web infrastructure against potential threats.
Discover iDatam Dedicated Server Locations
iDatam servers are available around the world, providing diverse options for hosting websites. Each region offers unique advantages, making it easier to choose a location that best suits your specific hosting needs.