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.
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.
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
Frequently asked questions
What causes a 500 internal server error in WordPress?
+It is a generic server failure. The common WordPress causes are a corrupted .htaccess file, a plugin or theme with a fatal error, an exhausted PHP memory limit, incorrect file permissions, and a PHP version mismatch after a host upgrade. The server error log names the actual cause.
How do I fix a 500 error caused by .htaccess?
+Rename the .htaccess file in the site's root folder to .htaccess-old using SFTP or your host's file manager, then reload the site. If it works, go to Settings, Permalinks in the dashboard and click Save Changes to generate a clean new .htaccess file.
Where do I find the error log for a 500 error?
+Look in your hosting control panel under Logs or Error Log, or for a file named error_log in the site folder. You can also enable WP_DEBUG_LOG in wp-config.php and read wp-content/debug.log. The most recent entries at the time of the error usually state the cause.
Will clearing my browser cache fix a 500 error?
+No. A 500 error comes from the server, not your browser, so clearing the cache or switching devices will not help. It is worth trying only to confirm that the error is not a stale cached copy of the error page.
Why is my WordPress 500 error intermittent?
+Intermittent 500 errors usually mean resource limits, such as memory or CPU limits on shared hosting, a heavy plugin task, or traffic spikes. Check the error log for a repeating pattern, review recently added plugins, and consider whether the site has outgrown its hosting plan.
More from Insights
Let's keep the conversation going
We're equipped to tackle your challenges head-on. Learn more about how Inspirable can help your organization grow.