Home›Insights›WordPress 500 Internal Server Error: How to Find the Cause and Fix It
WordPress

WordPress 500 Internal Server Error: How to Find the Cause and Fix It

A WordPress 500 internal server error is a generic server failure, not a specific diagnosis. This guide shows how to read the server error log, fix a corrupted .htaccess file, rule out plugins and themes, and check memory, permissions, and PHP version.

I
Inspirable Editorial•7 min read

A 500 internal server error is the web server's way of saying something went wrong that it could not handle, without saying what. In WordPress it is most often caused by a corrupted .htaccess file, a plugin or theme error, an exhausted PHP memory limit, or incorrect file permissions. Because the message itself is generic, fixing it means finding the real error in the server error log and then testing the usual causes one by one.

A 500 error does not say what is wrong. It says the server hit something it could not handle, and the error log is where it tells you what.
Site down or broken right now?
Talk to a USA-based WordPress support team. Call and we will start on it.
Call 844-455-2800Send us a message

What a 500 error means, and what it does not

A 500 error is a server-side failure, so it is not caused by your browser, your device, or your internet connection, and clearing your cache will not fix it. It can affect the whole site, only the admin, or only certain pages. That distinction narrows the cause: a site-wide 500 right after an edit to .htaccess or wp-config.php points to that file, while a 500 only on one page or action points to a plugin or template used there.

Start with the server error log

Start with the server error log, because it names the real cause. In your hosting control panel look for a section called Logs, Error Log, or Metrics, or find the file named error_log in the site's folder. The most recent lines at the time you saw the error usually say something specific, such as a PHP fatal error naming a plugin file, an invalid command in .htaccess, a memory limit message, or a permission denied entry. You can also add define( 'WP_DEBUG', true ); and define( 'WP_DEBUG_LOG', true ); to wp-config.php and read wp-content/debug.log. Whatever the log says is your next step, and the sections below cover the common results.

Fix a corrupted .htaccess file

A corrupted .htaccess file is the classic cause, especially after installing a plugin that edits rewrite rules or changing permalinks. Connect with SFTP or the host file manager and find .htaccess in the site's root folder; hidden files must be shown to see it. Rename it to .htaccess-old and reload the site. If the site comes back, log in to the dashboard, go to Settings, Permalinks, and click Save Changes without altering anything. WordPress writes a fresh, clean .htaccess file. If you use a server that does not read .htaccess, such as Nginx, this step does not apply and the cause is elsewhere.

Plugins, themes, and PHP memory

If the log or .htaccess did not explain it, test plugins and themes. Rename the plugins folder inside wp-content to plugins-off. If the site returns, a plugin is responsible: rename the folder back and reactivate plugins one at a time, reloading the site after each, until the 500 returns. If plugins are not the cause, rename your active theme's folder so WordPress falls back to a default theme. Also check memory: if the log mentions Allowed memory size exhausted, add define( 'WP_MEMORY_LIMIT', '256M' ); to wp-config.php, or ask your host to raise the PHP memory limit. A plugin that runs a heavy task, such as an import, a backup, or an image regeneration, can trigger a 500 by exhausting memory.

File permissions and PHP version

Incorrect file permissions can also cause a 500. As a general rule WordPress folders should be set to 755 and files to 644, and wp-config.php is often set tighter. Permissions that are too open or too closed after a migration or a restore can make the server refuse to run files. Your host's file manager or an SFTP client can show and change these. Check the PHP version too: after a host upgrade, an older plugin or theme can fail on a newer version, and the error log will show a PHP fatal error or deprecated function. Temporarily switching PHP back, then updating the plugin, is a safe sequence.

When the 500 error keeps coming back

If a 500 error keeps returning after you clear it, treat it as a symptom of something underneath: a plugin that is slowly exhausting resources, a hosting plan that is too small for the site's traffic, a cron job that runs too heavily, or an injected file. Check the error log for a repeating pattern, review recently added plugins, and confirm the site has not been compromised, since malicious code can cause intermittent 500 errors; see our guide on the WordPress site is hacked warning signs. For related errors, see the critical error guide and the database connection error guide.

Get the 500 error fixed

If you would rather not troubleshoot the 500 error yourself, or the steps above did not clear it, Inspirable's USA-based team can take it from here. Call 844-455-2800 or contact us and we will find the cause, restore the site, and explain what happened in plain language. See our WordPress support services for how emergency fixes and monthly support work. A WordPress care plan from $49.99 a month, with encrypted backups every 5 hours and managed updates, is what prevents most of these errors in the first place.
Call 844-455-2800Send us a message

Frequently asked questions

I
Inspirable Editorial
Enterprise WordPress development since 2012