Skip to content

Fix 500 Internal Server Error in cPanel

Server troubleshooting

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 .htaccess rule
  • 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

  1. Open the site in an incognito/private browser window.
  2. Test: - Homepage - One inner page - /wp-admin/ (if WordPress)
  3. 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

  1. Log in to cPanel.
  2. Open MetricsErrors.
  3. Refresh the page and re-open the URL that triggers the 500.
  4. 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.

  1. Open File Manager in cPanel.
  2. Go to your site root (typically public_html/).
  3. Locate .htaccess (enable “Show Hidden Files” if needed).
  4. Rename it to .htaccess.bak.
  5. 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.

  1. In cPanel, open SoftwareMultiPHP Manager.
  2. Select your domain.
  3. Set a stable version (commonly PHP 8.1 or PHP 8.2 depending on your app).
  4. Click Apply.

Then check again.

Increase PHP memory limit (common for WordPress)

If the log shows memory exhaustion, increase memory:

  1. Open SoftwareMultiPHP INI Editor (or “Select PHP Version”, depending on server).
  2. Raise memory_limit (example: 256M).
  3. 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)

  1. File Manager → public_html/wp-content/
  2. Rename plugins to plugins.off
  3. 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

  1. File Manager → wp-content/themes/
  2. Rename the active theme folder (example: mythememytheme.off)
  3. WordPress will fall back to a default theme if available.

Enable WordPress debug (temporary)

Edit wp-config.php:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

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.