# Fix 500, 403, 404 and 508 errors on web hosting

> Find the cause of website errors on shared hosting: read the error log, fix .htaccess, permissions, missing index files and PHP errors, and spot 508 limits.

Difficulty: Intermediate

A website error page tells you **that** something failed; the **error log** tells you **why**. This guide shows where to find the log in **cPanel** and **Plesk** and the usual causes behind each error code on shared hosting. For 502, 503 and 504 errors, see [website 502, 503 and 504 errors](/guides/website-502-503-504).

## Step 1: Open the error log

**cPanel**

Open **Errors** (in the **Metrics** section). It shows up to 300 of the most recent entries of the web server's error log, newest first. Reload your page to cause the error, then refresh the log.
**Plesk**

Open **Websites & Domains**, then the domain's **Logs**. Filter for errors and reload your page to see the new entry.

Applications such as WordPress can also write their own log; see [fix WordPress errors](/guides/fix-wordpress-errors).

## 500 Internal Server Error

| Message in the log | Cause | Fix |
|---|---|---|
| `Invalid command` or `.htaccess: … not allowed here` | A line in `.htaccess` that the server does not accept | Rename `.htaccess` to `.htaccess.bak` to test; then remove or correct the line |
| `PHP Fatal error: …` | A PHP error in your code, a plugin or a theme | Fix or disable the named file; check the PHP version and extensions ([PHP version and settings](/guides/hosting-php-version-settings)) |
| `Allowed memory size … exhausted` | The script hit `memory_limit` | Raise it within your plan or fix the script |
| `SoftException` or a message about writable files | A file or folder is writable by others (for example `777`) | Set files to `644` and folders to `755` |

**Verify:** the page loads after each change. Change one thing at a time.

## 403 Forbidden

- **Permissions:** the web server cannot read the file. Files need `644`, folders `755`.
- **No index file:** the folder has no `index.php` or `index.html`, and directory listing is turned off. Upload the index file into the right folder ([upload website files](/guides/upload-files-ftp-sftp)).
- **Rules in `.htaccess`:** a `Deny` or `Require` rule blocks the request, for example after a security plugin added rules. Rename `.htaccess` to test.
- **A security filter blocked the request:** some requests (for example forms with unusual content) are stopped by the server's web application firewall. The error log names the rule; send it to us in a ticket if it blocks legitimate use.

## 404 Not Found right after uploading

- The files are in the wrong folder (`public_html` for cPanel, `httpdocs` for Plesk).
- Linux file names are case-sensitive: `About.html` is not `about.html`.
- WordPress and many frameworks need their rewrite rules in `.htaccess` for "pretty" addresses. In WordPress, **Settings › Permalinks** and **Save Changes** writes them again.

## 508 Resource Limit Is Reached, and 500 or 503 under load

Shared hosting accounts have limits for CPU, memory, input/output and **entry processes** (simultaneous requests). According to CloudLinux, which many shared servers use:

- When the **entry processes** limit is full, the server answers **508 Resource Limit Is Reached**.
- When the **memory** or **number of processes** limit is reached, requests fail with **500** or **503**.
- When **CPU** or **I/O** limits are reached, the site becomes slower.

If your panel shows a **Resource Usage** page, it tells you which limit was hit and when. Fixes: cache pages (for WordPress: [LiteSpeed Cache](/guides/wordpress-litespeed-cache)), block bad bots, remove slow plugins, and move to a larger plan if the traffic is real.

## Next steps

- WordPress-specific errors: [fix WordPress errors](/guides/fix-wordpress-errors).
- Gateway errors: [website 502, 503 and 504 errors](/guides/website-502-503-504).
- Signs of a hack (unknown files, redirects): [clean a hacked website](/guides/clean-hacked-website).

## Frequently asked questions

### Where do I find the error log?

In cPanel under Errors, which shows the latest entries of the web server's error log. In Plesk under the domain's Logs. Your application may keep its own log as well.

### What does 508 Resource Limit Is Reached mean?

Your account reached the limit of simultaneous requests it may process (entry processes). Pages served from a cache avoid it; if it happens often, optimise the site or move to a larger plan.

### Should I set files to 777 to fix a 403?

No. Use 644 for files and 755 for folders. 777 is unsafe and many servers refuse to run scripts with it, which causes 500 errors.

### The error started after an update. What now?

Undo the update (restore the file or switch the plugin off), or restore a backup. Then check the log to see what the update broke.

---

Source: <https://hyperdc.com/guides/products/hosting-500-403-errors>\
Updated: 2026-10-16
