Skip to main content

HostBible Guide: Fix WordPress “Error 500 – Internal Server Error” (cPanel)

Fix WordPress HTTP 500 / “Internal Server Error” on HostBible: check error logs, raise PHP memory, disable plugins, reset .htaccess.

C
Written by Christopher Handscomb
Updated over 3 months ago

What this article covers

A practical, safe checklist you can follow in cPanel to diagnose and fix most WordPress 500 errors—without shell access. If you get stuck, see When to contact HostBible at the end.


Quick Fix Checklist (most issues)

  1. Check the exact error (cPanel Metrics → Errors) and any error_log files.

  2. Create a quick backup (zip your site files + export DB).

  3. Increase PHP memory limit to 256M.

  4. Temporarily disable plugins (rename the /wp-content/plugins folder).

  5. Switch to a default theme (rename your active theme folder).

  6. Reset .htaccess to the default WordPress rules.

  7. Try a different PHP version (e.g., 8.1/8.2/8.3) via MultiPHP Manager.

  8. Clear caches/CDN (plugin cache, server cache, and CDN if used).

  9. Restore from a recent backup if a specific change triggered the error.

Work through the steps in order; test the site after each change.


Step-by-step (cPanel)

1) Find the exact error

Why: “500” is a generic code. The real cause is in the logs.

  • In cPanel, go to Metrics → Errors to see the latest entries.

  • Also check for error_log files in File Manager (often in public_html/ or inside wp-admin/, wp-content/, or the plugin/theme folder that failed).

  • Note any PHP Fatal error, memory exhausted, syntax error, or .htaccess rewrite error. Keep a copy for support.


2) Make a quick backup (recommended)

Files: In File Manager, select your site’s root (often public_html or the add-on domain’s folder) → Compress to a zip.
Database: If you can, use phpMyAdmin → select your WP database → Export (Quick → SQL).


3) Raise PHP memory limit (common fix)

  • In cPanel, open MultiPHP INI Editor (or Select PHP Version → Options on some servers).

  • Choose your domain and set:

    • memory_limit256M

    • (Optional) max_execution_time120

  • Save and test the site.

If you still see “Allowed memory size exhausted” in logs after this, continue with disabling plugins/themes.


4) Disable all plugins (without wp-admin)

  • In File Manager go to /wp-content/.

  • Rename the plugins folder to plugins.disabled.

  • Test the site.

    • If it loads, a plugin is the cause.

    • Restore the folder name to plugins, then rename plugins one-by-one to isolate the culprit.


5) Switch to a default theme (without wp-admin)

  • In /wp-content/themes/, rename your active theme folder (e.g., astraastra.off).

  • Ensure a default theme (e.g., twentytwentyfour) exists; if not, upload one or install later.

  • Test the site.

    • If it works now, the theme (or a child theme) needs fixing or updating.


6) Reset .htaccess

Corrupt rules frequently cause 500s.

  1. In your site root (often public_html), rename .htaccess to .htaccess.bak.

  2. Create a new file named .htaccess and paste the default rules:

# 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
  1. Save and test.

  2. (If wp-admin becomes accessible later) go to Settings → Permalinks → Save to regenerate rules.


7) Try a different PHP version

In MultiPHP Manager:

  • Select your domain → change PHP version (e.g., from 8.0 to 8.1, 8.2, or 8.3).

  • Apply and test.
    Some older plugins/themes break on newer PHP; occasionally the reverse is true.


8) Check file permissions (fast sanity check)

  • Folders: 755

  • Files: 644

  • wp-config.php can be 640 or 600 (if supported).
    Right-click → Permissions in File Manager to adjust. Incorrect permissions can trigger 500s.


9) Clear caches/CDN

  • Clear any caching plugin (if you regain wp-admin).

  • Clear server cache if your plan includes it.

  • If you use a CDN (e.g., Cloudflare), Purge Cache (and consider “Development Mode” briefly while testing).


Advanced (optional)

Enable WordPress debug logging (do not show errors to visitors)

  1. In the site root, edit wp-config.php.

  2. Above the line that says /* That's all, stop editing! */, add:

define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false); @ini_set('display_errors', 0);
  1. Reproduce the error, then open /wp-content/debug.log.

  2. Remove or set these to false when finished.


Repair database tables (if logs mention DB issues)

Temporarily add to wp-config.php:

define('WP_ALLOW_REPAIR', true);

Visit https://yourdomain.com/wp-admin/maint/repair.php, run a Repair and Optimize, then remove the line from wp-config.php.


Re-upload clean WordPress core

If logs point to corrupted core files:

  1. Download the latest WordPress package from wordpress.org.

  2. In File Manager, upload and extract it to a temporary folder.

  3. Copy over the fresh /wp-admin/ and /wp-includes/ to your site (do not overwrite wp-content/ or wp-config.php).

  4. Test.


Common log messages → likely cause → quick action

Log snippet (example)

Likely cause

Quick action

PHP Fatal error: Allowed memory size ... exhausted

Memory limit too low or heavy plugin

Raise memory_limit to 256M; disable plugins to isolate

PHP Fatal error: Uncaught Error ... in /wp-content/plugins/...

Faulty/incompatible plugin

Rename the offending plugin folder

Primary script unknown

Bad path/rewrite

Reset .htaccess; confirm correct document root

rewrite or internal redirection cycle

.htaccess loop

Reset .htaccess to default

Call to undefined function ...

Wrong PHP version or missing extension

Switch PHP version; enable required extensions; update plugin/theme

Permission denied

File/folder permissions wrong

Set folders 755, files 644


When to contact HostBible

If the error persists after the steps above, reach out with:

  • Domain and approximate time the error began.

  • What changed recently (updates, new plugin, migration, edits).

  • Error entries from cPanel (Metrics → Errors) and any error_log or wp-content/debug.log snippets.

  • Steps you’ve already tried from this guide.

This information lets us pinpoint and resolve the issue faster.


Snippets to copy‑paste

Default WordPress .htaccess

# 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

WordPress debug logging (temporary)

define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false); @ini_set('display_errors', 0);

Notes & safe practices

  • Make one change at a time and test to identify the cause.

  • Keep backups; if a specific change triggered 500, restoring may be quickest.

  • Turn off debugging and remove temporary lines once finished.

Written for HostBible customers. If you need a hand at any step, contact HostBible Support with your error details and we’ll help you get back online quickly.

Did this answer your question?