---
title: '500 Internal Server Error'
url: 'https://learn.getgrav.org/2/troubleshooting/internal-server-error'
markdown: 'https://learn.getgrav.org/2/troubleshooting/internal-server-error.md'
date: '2026-09-10'
description: '500 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error. More …'
taxonomy:
  category:
    - docs
---

# 500 Internal Server Error

> The server encountered an internal error or misconfiguration and was unable to complete your request.
> 
> Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
> 
> More information about this error may be available in the server error log. Apache/2.4.7 Server at localhost Port 80

This error can be triggered by the following:

- server misconfiguration (httpd.conf)
- .htaccess issues
- mod\_security or similar

### Test PHP is Working

The first thing you should do is ensure PHP is working properly on your server, and Grav is not the direct cause of the issue. To test this simply create a temporary file (remove it afterwards for security!) in the root of your Grav folder called `info.php`. This file should have the following PHP code:

PHP

```
<span class="line"><span class="line-number" style="color: #9D9D9F;-webkit-user-select: none"> 1</span><span class="token" style="color: #383A42;;--phiki-dark-color: #56b6c2"><</span><span class="token" style="color: #383A42;;--phiki-dark-color: #c678dd">?</span><span class="token" style="color: #986801;;--phiki-dark-color: #abb2bf">php</span><span class="token"> </span><span class="token" style="color: #0184BC;;--phiki-dark-color: #56b6c2">phpinfo</span><span class="token" style="--phiki-dark-color: #abb2bf">(</span><span class="token" style="--phiki-dark-color: #abb2bf">)</span><span class="token" style="--phiki-dark-color: #abb2bf">;</span><span class="token">
</span></span>
```

Then point your browser at this file: `http://my-site.example/your_grav_directory/info.php`. You should get a report page listing all the information related to the PHP configuration including version and extensions loaded.

### Check permissions

A 500 error can be triggered by having the wrong permissions. Check [the permissions guide](https://learn.getgrav.org/17/troubleshooting/permissions)

### Register Globals Issue

Some people who have recently upgraded to PHP 5.5 from version 5.4 or 5.3, may still have some out of date settings in their `php.ini` file. One item that can cause a **500 Internal Server Error** is the `register_globals` setting. Simply remove or comment out the line:

APACHE

```
<span class="line"><span class="line-number" style="color: #9D9D9F;-webkit-user-select: none"> 1</span><span class="token">register_global = </span><span class="token">On</span><span class="token">
</span></span>
```

Then restart your Apache server.

### ThreadStackSize on Windows

If your server is running on Windows, you could be getting a 500 Internal Server Error due to the fact that the **ThreadStackSize** is much too small. Simply append this code to the bottom of your `httpd.conf` file:

APACHE

```
<span class="line"><span class="line-number" style="color: #9D9D9F;-webkit-user-select: none"> 1</span><span class="token"><</span><span class="token">IfModule</span><span class="token"> </span><span class="token" style="color: #50A14F;;--phiki-dark-color: #98c379">mpm_winnt_module</span><span class="token">></span><span class="token">
</span></span><span class="line"><span class="line-number" style="color: #9D9D9F;-webkit-user-select: none"> 2</span><span class="token">  </span><span class="token" style="color: #A626A4;;--phiki-dark-color: #c678dd">ThreadStackSize</span><span class="token"> </span><span class="token" style="color: #986801;;--phiki-dark-color: #d19a66">8388608</span><span class="token">
</span></span><span class="line"><span class="line-number" style="color: #9D9D9F;-webkit-user-select: none"> 3</span><span class="token"></</span><span class="token">IfModule</span><span class="token">></span><span class="token">
</span></span>
```

Then restart your Apache server.

### Options -Indexes

Grav uses a `-Indexes` option to force no directory listings of folders. Some hosts do not like Apache `.htaccess` manipulating the `Options` setting.

We have seen reports that simply commenting out this line in Grav's `.htaccess` file can fix the Internal Server error problems for users in this situation:

APACHE

```
<span class="line"><span class="line-number" style="color: #9D9D9F;-webkit-user-select: none"> 1</span><span class="token" style="color: #A0A1A7;font-style: italic;;--phiki-dark-color: #7f848e;--phiki-dark-font-style: italic"># Prevent file browsing
</span></span><span class="line"><span class="line-number" style="color: #9D9D9F;-webkit-user-select: none"> 2</span><span class="token" style="color: #A0A1A7;font-style: italic;;--phiki-dark-color: #7f848e;--phiki-dark-font-style: italic">#Options -Indexes
</span></span>
```

### RewriteBase problems

Have had some reports of 500 Internal Server Errors without setting the RewriteBase, on 1&1 hosting (but can apply to others too). Try changing

APACHE

```
<span class="line"><span class="line-number" style="color: #9D9D9F;-webkit-user-select: none"> 1</span><span class="token" style="color: #A0A1A7;font-style: italic;;--phiki-dark-color: #7f848e;--phiki-dark-font-style: italic"># RewriteBase /
</span></span>
```

to

APACHE

```
<span class="line"><span class="line-number" style="color: #9D9D9F;-webkit-user-select: none"> 1</span><span class="token" style="color: #A626A4;;--phiki-dark-color: #c678dd">RewriteBase</span><span class="token"> /
</span></span>
```

(Credit: <http://ahcox.com/webdev/1and1-internal-server-error-grav/>)

### Admin Panel Navigation

When navigating through Grav's admin panel, **Internal Server Error** message appears in the top left. This is due to incorrect permissions on your /cache folder.

![Internal Server Error](http://i.imgur.com/vyPfoZ7.png)

If this error is popping up the chances are you haven't set the correct permission on the /cache folder, rather than just making the folder writable you need to make it recursively writable. Running the below command from within your Grav directory should sort out the problem.

BASH

```
<span class="line"><span class="token" style="color: #4078F2;;--phiki-dark-color: #61afef">sudo</span><span class="token"> </span><span class="token" style="color: #50A14F;;--phiki-dark-color: #98c379">chmod</span><span class="token"> </span><span class="token" style="color: #986801;;--phiki-dark-color: #d19a66">755</span><span class="token"> </span><span class="token" style="color: #50A14F;;--phiki-dark-color: #98c379">cache/</span><span class="token"> </span><span class="token" style="color: #986801;;--phiki-dark-color: #d19a66">-</span><span class="token" style="color: #986801;;--phiki-dark-color: #d19a66">R</span><span class="token">
</span></span>
```

 [ Edit this page on Github ](https://github.com/getgrav/grav-learn/edit/develop/pages/2/11.troubleshooting/03.internal-server-error/doc.md) 

 © 2026 Grav Documentation. All rights reserved.

---

## Navigation

- Parent: [Troubleshooting](https://learn.getgrav.org/2/troubleshooting.md)
- Previous: [Grav Server Error](https://learn.getgrav.org/2/troubleshooting/server-error.md)
- Next: [403 Forbidden](https://learn.getgrav.org/2/troubleshooting/forbidden.md)
