# My site won't load: how to fix a 500 Internal Server Error (cPanel)

https://www.gyrohosting.com/en/knowledgebase/article/500-internal-server-error

- **What you will learn**: What a 500 error means, how to find its cause with the cPanel **Errors** screen and the `error_log` file, and how to fix errors caused by `.htaccess` or the PHP version.
- **Time**: 10 minutes

## 1. What does a 500 error mean?

"500 Internal Server Error" means the server received your request but ran into a problem while building the page. The browser only shows a generic error page; the real cause is written in the **server's error log**.

On shared hosting, most 500 errors come from the site's own files:

- a misspelt or unsupported line in the `.htaccess` file,
- a typo, a missing file or a plugin/theme incompatibility in the PHP code,
- a mismatch between the PHP version the site needs and the version selected for the account.

> **Info**
> 
> 403 (access denied) and 503/508 (resource limit) are different errors. For 403 see **B09 — My site returns 403 Forbidden**; for resource limits see **B42 — 503/508 Resource Limit Reached**.

## 2. Before you start

- Note **which address** fails and **when** it started (for example "right after a plugin update, on every page").
- Make a copy of every file before you change it. In File Manager, select the file and use **Copy** to duplicate it under a name such as `.htaccess-backup`.

> **Warning**
> 
> Don't delete files; rename them. A renamed file can be switched back in one click, while a deleted file only comes back from a backup.

## 3. Step-by-step diagnosis

### 3.1 Check the Errors screen

1. On the cPanel home page, find the **Metrics** section and click **Errors**.
2. In the **Latest web server error log messages** box, the newest entry is at the top. Check that its time matches your test.
3. Read the **file path** and the **cause** in the line. For example `.htaccess: Invalid command 'RewriteEngin'` tells you there is a misspelt command in the `.htaccess` file of that folder.

![Metrics → Errors: the newest error is at the top. Each line shows the path of the failing file and the cause (here a misspelt command in .htaccess).](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B41-01-en.webp)

### 3.2 Open the error_log file

PHP errors are usually written to a separate log as well. This log is often a file named `error_log` in the folder of the script that failed.

1. Open **File Manager** from the **Files** section.
2. Go to the folder of the failing page (the site root is usually `public_html`).
3. Select the `error_log` file and click **View**.

![Open the failing folder in File Manager. The PHP error log is often stored there under the name error_log.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B41-02-en.webp)

1. The bottom lines are the newest. Look for three things in each line: the **error type**, the **file path** and the **line number** (`on line 3`).

![An error_log line gives the error type, the file and the line number: Parse error = typo in the code, Fatal error = missing file or incompatible code.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B41-03-en.webp)

| What you see in the line | Meaning | What to do |
| --- | --- | --- |
| `PHP Parse error: syntax error` | Typo in the code (missing `;` or bracket) | Fix the line named in the file named, or undo the last change |
| `PHP Fatal error: require(): Failed opening required` | A file the code needs is missing | Upload the missing file; after a migration, check that all files arrived |
| `Call to undefined function` | The code uses a function that the selected PHP version or extension doesn't have | Check the PHP version or extension (Section 3.4) |
| `Allowed memory size ... exhausted` | The script hit its memory limit | Disable the heavy plugin; if it continues, open a support ticket |

### 3.3 Check the .htaccess file

Because its name starts with a dot, `.htaccess` is hidden in File Manager by default.

1. In File Manager, click **Settings** at the top right.
2. Tick **Show Hidden Files (dotfiles)** and click **Save**.

![Settings (top right) → Show Hidden Files (dotfiles) → Save. Files starting with a dot, such as .htaccess, then appear in the list.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B41-04-en.webp)

1. In the folder named on the Errors screen, select `.htaccess` and use **Rename** to change its name to `.htaccess-backup`.
2. Reload the site. If it opens, the problem is inside `.htaccess`.
3. Rename the file back, select it, click **Edit** and review the lines added most recently. Fix the faulty line and click **Save Changes**.

![Open the .htaccess named on the Errors screen in the editor. Here RewriteEngin was typed instead of RewriteEngine, so the site returns 500.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B41-05-en.webp)

> **Info**
> 
> In WordPress, `.htaccess` can be recreated from scratch: after renaming the file, open **Settings** → **Permalinks** in the WordPress dashboard and click **Save Changes** without changing anything. WordPress writes the file again.

### 3.4 Check the PHP version

If the error started right after a plugin, theme or software update, the software may need a newer (or older) PHP version.

1. Open **MultiPHP Manager** in the **Software** section. (Depending on your plan, this tool may appear as **Select PHP Version**.)
2. In the table, look at the **PHP Version** column next to your domain.
3. To change it, tick the domain, choose a version your software supports in the **PHP Version** list on the right and click **Apply**.
4. Wait a minute and try the site again.

![Software → MultiPHP Manager: tick the domain, choose the version in the PHP Version list and click Apply.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B41-06-en.webp)

> **Warning**
> 
> Choose the version your software supports, not simply "the newest". An old plugin can return 500 on a newer PHP version; a current WordPress may not run on an old one. Check the software's documentation for supported versions.

### 3.5 Still not fixed? Open a support ticket

In the client area go to **Support** → **New Support Ticket** → **Technical Support**, select your hosting service under **Related Service**, and include:

- the exact address (URL) that fails,
- the date and time the error started,
- the relevant line from the Errors screen or the `error_log` file,
- what you changed just before the error (update, plugin, migration).

![The order to follow for a 500 error: Errors screen first, then error_log, .htaccess and PHP version; if still unsolved, a support ticket.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B41-07-en.webp)

## 4. How do I confirm it's fixed?

- Open the site in a private window (so the browser cache doesn't show the old error).
- Refresh the Errors screen: there should be no new entry at the time of your test.
- If `error_log` has grown large, you can empty or delete it once the problem is solved; the file is recreated when a new error occurs.

## 5. Symptom → cause → fix

| Symptom | Likely cause | Fix |
| --- | --- | --- |
| The whole site returns 500; Errors shows `.htaccess: Invalid command` | Misspelt or unsupported line in `.htaccess` | Fix the line or remove the last line added (Section 3.3) |
| Only one page or one folder returns 500 | The `.htaccess` in that folder or a single PHP file | Follow the path on the Errors screen and check that file |
| Started right after a plugin/theme update | Code incompatibility or PHP version | Disable the plugin by renaming its folder; check the PHP version |
| 500 after a migration | Missing file, wrong database details, an `.htaccess` line specific to the old server | Add the file named in `error_log`, check the configuration file, simplify `.htaccess` |
| `Allowed memory size exhausted` in `error_log` | The script hit its memory limit | Disable the heavy plugin; if it continues, see B42 and open a ticket |
| 503 or 508 instead of 500 | The account's resource limit was reached | Go to guide **B42** |
| 403 instead of 500 | Access block, security rule or file permission | Go to guide **B09** |

## 6. Frequently asked questions

**Does a 500 error mean the server has crashed?**

Usually not. If other sites on the same server work and only yours shows 500, the cause is most likely in your site's files. If there is a platform-wide issue, we announce it on the System Status page.

**The Errors screen is empty but the site still returns 500. What now?**

First check for an `error_log` file in the site root and in the failing folder. If you find nothing, load the page once more and refresh the screen; if it is still empty, open a support ticket with the exact URL and time.

**Is it a problem if I delete the error_log file?**

No. The file only stores log entries; if you delete it, it is recreated on the next error. Make sure the error is solved before deleting it so you don't lose the evidence.

**Can changing the PHP version break my site?**

It can; switching to a version your software doesn't support may cause new errors. Test the site right after the change; if something breaks, switch back on the same screen.

**Can I do this from the command line?**

Shared hosting plans don't include command-line (SSH) access. Everything in this guide is done with File Manager and the other cPanel tools, or over FTP.

> **Did you know?**
> 
> Gyro Uptime Monitoring can watch your site for you: when it starts returning 500 or another error, you get an instant alert, so you see the problem before your customers do.

## 7. Related guides

- **B09** — My site returns 403 Forbidden
- **B42** — 503/508 "Resource Limit Reached": reading your resource limits
- **B44** — Redirects with .htaccess
- **B50** — Visitor statistics and logs (Errors and Raw Access screens)
- **A08** — Opening a support ticket and tips for a quick resolution
