---
title: How to resolve error 403 on cPanel
description: "The error 403 above is mostly due to file permissions, wrong PHP version, plugins or server security settings or wrong permissions. # Possible cause 1: Server Security - Mod Security. When making changes/updates/installation and publishing, you can disable mod security…"
url: "https://truehost.com/support/knowledge-base/how-to-resolve-error-403-on-cpanel/"
updated: "2024-09-26"
category: Cpanel
---

# How to resolve error 403 on cPanel

The error 403 above is mostly due to file permissions, wrong PHP version, plugins or server security settings or wrong permissions.

# Possible cause 1: Server Security - Mod Security.

When making changes/updates/installation and publishing, you can disable mod security and once done turn it back on.

You do this on the cpanel as per the guide below.

> [How to turn Mod Security On/Off](https://www.truehost.com/support/knowledge-base/turn-mod-security-off/)

[“How to turn Mod Security On/Off” — ](https://www.truehost.com/support/knowledge-base/turn-mod-security-off/embed/#?secret=RMdozqucId#?secret=Qfaqh5Ahx5)

# Possible Cause 2: Corrupt .htaccess file

Also, check that your .htaccess file is not corrupted or there are no deny rules.

What to check for are deny rules.

# Deny access to .htaccess - This denies access to all .htacess files

`Order allow,deny Deny from all`

# The following code prevents anyone from viewing your website. Visitors will instead see a 403 when viewing your website.

`Order deny,allow`
Deny from all

`Require all denied`

# Denying access to specific file extensions

The following code forces any file ending in .php to throw a 403 Forbidden error when visited:

Apache 2.2
`Order Allow,Deny Deny from All`
Apache 2.4
`Require all denied`

Resolution.
Remove all those rules.
If you suspect there are multiple .htaccess file that you may not be aware of, you can access
your cpanel terminal and delete all of them at once using the command below.

`find . -type f -name ".htaccess" -exec rm -fv {} ;`

Then only legitimate .htaccess file will be created.

# Possible Cause 3: Wrong PHP version

And if seeing the error on accessing the site, check that you are using the correct PHP version.

1. Ensure you're using the correct version for your site.
2. Specifically to Truehost, since we do not use ALT-PHP versions, this may cause 403 if you use it.
   Ensure the version is EA-PHP and not ALT-PHP.

> [How To Change PHP Version in the Cpanel.](https://www.truehost.com/support/knowledge-base/how-to-change-php-version-in-the-cpanel/)

[“How To Change PHP Version in the Cpanel.” — ](https://www.truehost.com/support/knowledge-base/how-to-change-php-version-in-the-cpanel/embed/#?secret=1pRHO5Kp62#?secret=eYnqP3YazN)

# Possible Cause 4: Plugins.

Some wordpress plugins can block access to legitimate section of your site such as the admin dashboard.
Ensure to disable this plugins and check you can access your site.

# Possible Cause 5: Files/Folder's permissions.

Ensure to set your files and folder permissions correctly.
Folders should use 755 and files should use 644.

All Done.

You may also watch the video below to assist on the issue.

[How to Solve 403 Forbidden Error in cPanel](https://www.youtube.com/embed/MaVfJTywU9E?feature=oembed)
