Fix 500 Internal Server Error in cPanel¶

A 500 Internal Server Error means the web server hit something it couldn't process. In cPanel hosting, the cause is usually one of these:
- A broken
.htaccessrule - A PHP version or PHP extension mismatch
- Wrong file permissions or ownership after an upload/migration
- A WordPress plugin/theme crash
This playbook is designed to get you back online fast.
Warning
If this is a WooCommerce store or a production site with active orders, avoid random “fixes”. Follow the steps in order and take a backup first if possible.
Step 1: Confirm the error and isolate the scope¶
- Open the site in an incognito/private browser window.
- Test:
- Homepage
- One inner page
-
/wp-admin/(if WordPress) - Note if the error happens:
- On the entire site
- Only on one path (example: only
/wp-admin/) - Only after a change (plugin update, migration, new SSL, etc.)
This tells you where to focus.
Step 2: Check the server error log in cPanel¶
- Log in to cPanel.
- Open Metrics → Errors.
- Refresh the page and re-open the URL that triggers the 500.
- Look for fresh entries with keywords like:
-
rewrite,RewriteRule-php fatal,PHP Parse error,Allowed memory size-permission denied,Premature end of script headers
Tip
If you see a clear error message, fix that specific issue first. It will save you 30 minutes of guessing.
Step 3: Rule out a broken .htaccess in 30 seconds¶
A bad .htaccess is the #1 cause of sudden 500s.
- Open File Manager in cPanel.
- Go to your site root (typically
public_html/). - Locate
.htaccess(enable “Show Hidden Files” if needed). - Rename it to
.htaccess.bak. - Reload your site.
If the site loads now, the .htaccess rules are the culprit.
Restore a default WordPress .htaccess (if WordPress)¶
Create a new .htaccess and paste:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Then reload.
Step 4: Verify PHP version and PHP settings¶
If the error started after a plugin/theme update or migration, your PHP version may be incompatible.
- In cPanel, open Software → MultiPHP Manager.
- Select your domain.
- Set a stable version (commonly PHP 8.1 or PHP 8.2 depending on your app).
- Click Apply.
Then check again.
Increase PHP memory limit (common for WordPress)¶
If the log shows memory exhaustion, increase memory:
- Open Software → MultiPHP INI Editor (or “Select PHP Version”, depending on server).
- Raise
memory_limit(example:256M). - Save, then reload the site.
Step 5: Fix permissions quickly (without breaking things)¶
Wrong permissions often happen after manual uploads or restoring from a zip.
General safe defaults:
- Folders: 755
- Files: 644
In cPanel File Manager:
1. Right-click the folder (example: public_html) → Change Permissions
2. Apply recursively:
- directories to 755
- files to 644
Do not set 777
777 is a security problem and often gets blocked by server hardening anyway.
Step 6: WordPress-only quick recovery steps¶
Disable plugins (fastest)¶
- File Manager →
public_html/wp-content/ - Rename
pluginstoplugins.off - Reload the site
If the site loads, a plugin caused the crash. Create a new plugins folder and move plugins back one-by-one.
Switch theme¶
- File Manager →
wp-content/themes/ - Rename the active theme folder (example:
mytheme→mytheme.off) - WordPress will fall back to a default theme if available.
Enable WordPress debug (temporary)¶
Edit wp-config.php:
Then reproduce the error and check:
- wp-content/debug.log
Turn debug off after diagnosis.
When to escalate to GOZEN HOST Support¶
Open a ticket if: - The cPanel Errors log is empty but the site is still 500 - The issue started after a server-side change outside your control - The site is critical and you want a clean rollback
Include: - The domain name - Exact time it started - What changed just before it happened - The latest error log line(s) from Metrics → Errors
Summary¶
Most 500 errors on cPanel are caused by .htaccess, PHP incompatibility, or WordPress plugin/theme failures. Follow the sequence:
Errors log → .htaccess → PHP version → permissions → WordPress isolation.