403 Forbidden error when trying to access my WordPress site
When I try to access my WordPress site, I keep getting 403 Forbidden errors. How do I fix this?
WordPress sites will return a 403 error when there is an access issue, and can often be solved by checking your plugins, Apache configuration, and file permissions.
Troubleshoot plugin issues by deactivating all of them. If you still get 403's after deactivating, move on. Otherwise, try reactivating them one-by-one while continually checking for 403 errors. If the 403 errors resume after you activate a particular plugin, then you can remove or further troubleshoot that plugin.
The .htaccess file for your WordPress site determines how Apache serves files and can be found in the site's public_html directory. Check your .htaccess file against the WordPress's default examples found here.
Make sure your directory and file permissions are set correctly to allow proper access. You can check file and directory permissions with the command
ls -l and change them with
chmod. Directories should be set to 755 or 750, and files should be set to 644 or 640 (exception: wp-config.php should be 440 or 400). For more on file permission settings and using the
chmod command, check out WordPress's documentation here.