Fixing WordPress 500 Internal Server Error
Diagnose and resolve a WordPress 500 error caused by .htaccess syntax errors, PHP fatal errors, plugin conflicts, memory limits, or corrupted files.
On this page
A 500 Internal Server Error on WordPress means PHP or the web server encountered a fatal error before it could serve a page. The error itself doesn't tell you what went wrong-you need to look at the error logs to find the cause.
Check the error log first
In cPanel, go to Metrics → Errors. The error log shows recent PHP and server errors with the file and line number. This is the fastest way to identify the cause of a 500 error.
Alternatively, enable WordPress debug logging:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Then check wp-content/debug.log for the error message. Remove or disable this after troubleshooting.
.htaccess syntax error
A corrupted or malformed .htaccess file is the most common cause of 500 errors after a plugin update or a .
Fix: In File Manager, rename .htaccess to .htaccess_old, then reload your site. If the 500 error disappears, the .htaccess was the cause.
To generate a fresh .htaccess, go to WordPress → Settings → Permalinks and click Save Changes without changing anything. WordPress regenerates it automatically.
Plugin or theme conflict
If the error occurred after installing or updating a plugin:
- In File Manager, go to
wp-content/plugins/ - Rename the recently updated plugin's folder (e.g.
bad-plugin→bad-plugin_disabled) - Reload the site
- If the 500 error resolves, that plugin was the cause
- Check for an updated version of the plugin or report the issue to its developer
For a theme conflict, rename the active theme folder in wp-content/themes/-WordPress will fall back to a default theme.
PHP memory limit
If the error log shows Allowed memory size of X bytes exhausted, increase PHP memory:
define( 'WP_MEMORY_LIMIT', '256M' );
Also increase it in cPanel → MultiPHP INI Editor → set memory_limit to 256M.
File permission errors
If the error log shows "Permission denied" errors, check file permissions. WordPress files should be 644 (files) and 755 (directories). Permissions set to 000 or 777 can cause 500 errors. Fix via cPanel → File Manager → right-click → Change Permissions, or via SSH:
find ~/public_html -type d -exec chmod 755 {} \; && find ~/public_html -type f -exec chmod 644 {} \;
Need managed WordPress hosting?
Run WordPress on UnderHost managed hosting with performance tuning, SSL, backups, security guidance, and expert support.





















