"500 Internal Server Error" is the web server's way of saying something went wrong, and I am not going to tell you what. It is frustrating precisely because it is generic. The good news is that the real reason is almost always written down somewhere on your hosting account. This guide shows you where to look and walks through the fixes in the order that solves most cases fastest.
What a 500 error actually means
HTTP status codes in the 500 range mean the server accepted the request but failed to produce a response. A plain 500 is the catch-all. On a typical cPanel account, the cause is one of these:
- A syntax error or unsupported directive in
.htaccess. - A PHP fatal error — often after a plugin update or a PHP version change.
- A script running out of memory or time.
- Wrong file or folder permissions.
- The account hitting its resource limits.
Related codes have more specific meanings: 503 usually means the service is temporarily unavailable or overloaded, and 508 means the account's resource limit was reached. If you are seeing a different code, start with Website not working? instead.
Step 1: Think about what changed
Most 500 errors appear right after a change. Before you dig into logs, ask:
- Did you (or an automatic update) update a plugin, theme or the CMS itself?
- Did you switch PHP version in MultiPHP Manager?
- Did you or a plugin add rules to
.htaccess? - Did you upload new files or change permissions?
If the answer is yes, undo that change first. It is the quickest fix and confirms the cause. To see which URLs are affected without your browser's cache getting in the way, check the status code from a terminal:
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/wp-admin/
Step 2: Read the error log
The log is where the 500 error stops being a mystery. On cPanel there are two places to look:
error_logfiles. PHP writes errors to a file callederror_login the folder where the failing script lives — usuallypublic_html, orpublic_html/wp-adminfor errors in the WordPress dashboard. Open it with File Manager and scroll to the bottom.- Metrics › Errors. cPanel's error page shows the latest web server errors, such as an invalid
.htaccessdirective or a permission problem.
Reload the broken page first, then read the newest lines. Typical messages and what they mean:
PHP Fatal error: Uncaught Error: Call to undefined function ... in /home/user/public_html/wp-content/plugins/some-plugin/...
-> A plugin uses a function that does not exist in this PHP version, or a required extension is missing.
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted ...
-> The script needs more memory than memory_limit allows.
/home/user/public_html/.htaccess: Invalid command 'php_value', perhaps misspelled ...
-> .htaccess contains a directive the server does not support.
Tip: If the log is empty even though the page fails, the error probably happens before PHP runs — in
.htaccessor because of permissions. Go straight to Step 3 and Step 7.
Step 3: Test .htaccess
A single typo in .htaccess breaks the whole site. To test it, rename the file in File Manager to .htaccess-off and reload the page.
- The site works: the problem is in that file. Open the renamed copy, look for lines added recently — especially
php_value,php_flagor hand-written redirects — and remove them. - Nothing changes: rename the file back and continue.
For WordPress, the safest way to get a clean file is to let WordPress write it: go to Settings › Permalinks and click Save Changes. The standard rules look like this — if you paste them by hand, keep them between the # BEGIN WordPress and # END WordPress marker lines so WordPress can manage them later:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Step 4: Check the PHP version and extensions
If the error started after a PHP change, open Software › MultiPHP Manager and switch back to the previous version. If that fixes it, the site or a plugin is not ready for the newer version — update it before trying again.
Also check that the extensions your software needs are enabled for the version you use. A missing mysqli, intl or mbstring produces fatal errors that look like code bugs.
Step 5: Adjust PHP limits sensibly
When the log says memory was exhausted or the maximum execution time was exceeded, raise the specific limit in Software › MultiPHP INI Editor. Increase in steps — for example memory_limit from 128M to 256M — rather than setting huge values. If a script needs more than that, something in it is inefficient. The guide How to optimise PHP explains why higher limits do not equal more speed.
Step 6: Isolate plugins and themes in WordPress
If the log points to a plugin or theme, deactivate it. If you cannot reach the dashboard:
- Check your admin email — recent WordPress versions send a recovery-mode link when a fatal error occurs.
- Otherwise, in File Manager rename
wp-content/pluginstoplugins-off. All plugins are deactivated. - If the site loads, rename the folder back and reactivate plugins one by one in the dashboard until the error returns.
- For a theme problem, rename the active theme's folder; WordPress falls back to a default theme if one is installed.
If you need more detail, turn on WordPress debug logging for a short while in wp-config.php:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', '/home/USERNAME/logs/wp-debug.log'); // outside public_html
define('WP_DEBUG_DISPLAY', false);
Turn it off and delete the log when you are done.
Step 7: Fix file permissions
On standard cPanel hosting, files should be 644 and folders 755. Some servers refuse to run PHP files that are writable by everyone, and return a 500 instead. Never use 777. If you have SSH access, you can reset permissions for a site in one go:
cd ~/public_html
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod 600 wp-config.php # optional: tighter for config files with passwords
Step 8: Check resource usage
If errors come and go, look at Metrics › Resource Usage where your host offers it. Errors that coincide with peaks in CPU, memory or entry processes point to traffic spikes, bots or heavy cron jobs rather than broken code.
Restore from backup as a last resort
If nothing above helps and the site worked yesterday, restoring files from a backup can bring it back quickly. Restore only what you need — often just the files, not the database — because a restore overwrites everything changed since the backup. And remember that a restore removes the symptom, not the cause: if an automatic update broke the site, it may break it again tonight. See How to back up and restore WordPress.
When to contact support
If you have worked through the steps and still see a 500, send your host:
- The exact URL that fails and when it started.
- The relevant lines from
error_log. - What you changed recently and what you have already tried.
That information turns a long back-and-forth into a quick answer.
In short
Undo the last change, read error_log, then test systematically: .htaccess, PHP version and extensions, limits, plugins and theme, permissions and resource usage. Back up before every update so a restore is always available — but use it last, not first.
Help from Hostigan
Hostigan's web hosting runs on cPanel, so every log and tool mentioned here is in your panel. If you are stuck, contact support — for emergencies, support@hostigan.com is staffed 24/7.
Frequently asked questions
Rarely. In most cases the cause is in the site itself: a faulty .htaccess rule, a plugin that is incompatible with the PHP version, or a script that runs out of memory. The error log usually tells you which.