Website errors can be scary especially when your WordPress site suddenly shows a 403 Forbidden or 404 Not Found error. These issues are common among WordPress users and often stem from either a corrupted .htaccess
file or incorrect file/folder permissions. The good news is that both problems are easy to fix if you have access to cPanel.
In this article, we’ll walk you through the exact steps to diagnose and resolve these issues no technical background required!
What Are 403 and 404 Errors?
Before we jump into the fixes, let’s briefly understand what these errors mean:
-
403 Forbidden: Your web server understands the request, but refuses to allow access. Often caused by bad file permissions or misconfigured
.htaccess
rules. -
404 Not Found: The server can’t find the file or page requested. This usually happens if permalinks are broken or the URL is wrong again, the
.htaccess
file is a common culprit.
Step-by-Step Fix Using cPanel
Step 1: Log In to cPanel
Start by logging into your cPanel account. Most hosting providers include a cPanel login link in your welcome email or client dashboard.
Step 2: Access the File Manager
Once logged in:
-
Go to Files > File Manager
-
Open the directory:
public_html/
or the folder where your WordPress is installed
This is where your .htaccess
file lives.
Step 3: Fix or Rebuild the .htaccess File
The .htaccess
file controls how your site handles URLs and permissions. A corrupted one can easily cause 403/404 errors.
Option A: Rename the Existing .htaccess
-
Locate the
.htaccess
file inpublic_html/
-
Right-click and Rename it to
.htaccess-old
-
This disables the current file without deleting it
Option B: Recreate .htaccess from WordPress
Now log in to your WordPress dashboard (if accessible):
-
Go to Settings > Permalinks
-
Click Save Changes (even without making changes)
This will automatically regenerate a clean .htaccess
file with default rules.
If you can’t access WordPress, create a new
.htaccess
manually using File Manager:
Save this as .htaccess
in your root WordPress directory.
Step 4: Fix File and Folder Permissions
Permissions control who can read, write, or execute files and folders on your site.
To fix them:
-
In File Manager, right-click your WordPress folder (e.g.
public_html
) or go deeper into subfolders -
Use Change Permissions
Set the correct values:
-
Files:
644
-
Folders:
755
Never set folders or files to 777 it’s a security risk.
You may need to apply these permissions recursively if the error is site-wide.
Step 5: Test Your Site
After fixing .htaccess
and permissions:
-
Visit your website and test the pages showing errors
-
If the issue was with permalinks, they should now work
-
If it was a 403 error, folder access should now be restored
Still Not Working?
If you’ve tried both fixes and the problem persists:
-
Clear browser cache: Sometimes the error is cached
-
Disable plugins: A misbehaving security plugin can block access
-
Check directory ownership: Some rare issues may occur if files were uploaded with incorrect ownership via FTP
Contact your hosting support if nothing else works they can assist with backend server-level checks.
How to Avoid These Errors in the Future
-
Avoid editing
.htaccess
manually unless you know what you’re doing -
Use well-coded plugins and themes that don’t break URL rules
-
Don’t chmod files/folders to 777 unless absolutely necessary
-
Take regular backups so you can quickly restore your working
.htaccess
or permissions
Final Thoughts
403 and 404 errors caused by .htaccess
or permissions issues can break your WordPress site but they’re not permanent. With the power of cPanel and a little know-how, you can fix them yourself without waiting for a developer or support.
By learning how .htaccess
works and maintaining correct file permissions, you’re not just fixing errors you’re taking control of your website’s health and performance.
If you need help or prefer not to make changes yourself, reach out to your hosting provider’s support team. They’re here to assist you!