WordPress 500 Internal Server Error: Causes and Fixes
Usually a broken .htaccess, a plugin fatal error or PHP memory. Rename .htaccess, resave permalinks, raise memory_limit, then read the server error log.
A WordPress 500 Internal Server Error means the server hit a problem but cannot say what. The most common causes are a corrupted .htaccess file, a plugin or theme conflict, or a PHP memory limit that is too low. Try them in that order: rename .htaccess, regenerate your permalinks, raise the memory limit, disable plugins and the theme, and finally read your server’s error log for the exact cause.
Key Takeaways
- A 500 error is a catch-all. The real cause is in the server error log.
- Start with the quick wins: rename
.htaccess, then save permalinks again.- Plugin conflicts and low PHP memory are the next most likely causes.
- Use
wp-content/debug.logand your host’s error log to find specifics.- Back up before you change files.
The frustrating part of a 500 error is that it tells you nothing. It is the server’s way of saying “something went wrong.” The steps below move from the cheapest, most likely fixes to the more involved ones.
What Does a 500 Internal Server Error Mean?
HTTP status code 500 is a generic server-side failure. Your browser reached the server, but the server could not complete the request and did not have a more specific code to give. On WordPress it often appears as “500 Internal Server Error”, “HTTP Error 500”, or “The website is currently unable to handle this request.”
It may appear on the whole site, only on wp-admin, or only on certain pages. Note which, because it narrows the cause. If you see a blank page instead, read about the white screen of death.
What Causes It?
- A corrupted
.htaccessfile, often after a plugin edits rewrite rules. - A plugin or theme conflict, or a bad update.
- PHP memory exhaustion.
- A PHP version incompatibility after a host change.
- Wrong file or folder permissions.
- Corrupted core files.
- Server-level issues, such as a misconfiguration or resource limit at the host.
How Do You Fix a 500 Internal Server Error?
Take a backup of your files and database first. You will need FTP, SFTP or your host’s file manager. Check the site after each step.
1. Rename the .htaccess file
In the site root, find .htaccess. It may be hidden, so switch on “show hidden files” in your FTP client or file manager. Rename it to .htaccess-old. If the site now loads, the file was the cause.
(This applies to Apache and LiteSpeed servers. Nginx servers do not use .htaccess, so skip this step there.)
2. Regenerate permalinks to rebuild .htaccess
Log in to wp-admin, go to Settings > Permalinks, and click Save Changes without altering anything. WordPress writes a fresh .htaccess. If the file cannot be written, you can create it yourself with the standard WordPress rules:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
That is the default for a single-site install. Multisite uses different rules.
3. Raise the PHP memory limit
Add this to wp-config.php above the “That’s all, stop editing” line:
define( 'WP_MEMORY_LIMIT', '256M' );
If it makes no difference, your host may cap PHP itself. Raise memory_limit in your host’s PHP settings, or ask support. The white screen guide covers this in more detail.
4. Deactivate all plugins, then the theme
Rename wp-content/plugins to plugins-off. If the site loads, rename it back, log in, and reactivate plugins one by one until the error returns. That plugin is the culprit.
If plugins are not the cause, rename the active theme’s folder in wp-content/themes so WordPress falls back to a default theme.
A related message, there has been a critical error on this website, is the more helpful version of a plugin or theme failure and comes with a recovery email.
5. Read the error logs
This is where the real answer lives. Turn on WordPress logging by adding to wp-config.php:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Then open wp-content/debug.log. Also check your host’s own error log, often found in the control panel under “Logs” or “Error Log”, or as an error_log file in the site folder. The last few lines usually name a file, a plugin or a limit. Switch debugging off again when you are done.
6. Check file permissions
The usual settings are 755 for folders and 644 for files, and 600 or 640 for wp-config.php. Your FTP client or file manager lets you change these. Wrong permissions, especially on .htaccess or index.php, can cause a 500 error.
7. Reinstall WordPress core files and check PHP
Upload a fresh copy of WordPress from wordpress.org, excluding wp-content and wp-config.php, to replace damaged core files. Also check the PHP version in your host’s panel. If it changed recently, try the previous version to test.
8. Contact your host
If nothing works, send your host the time of the error and ask them to check the server log. Problems like a resource limit, a security rule blocking requests, or a server fault are only visible to them.
How Do You Prevent 500 Errors?
- Back up regularly so a bad change can be reversed in minutes.
- Update one item at a time and check the site afterwards. See how to judge whether a plugin update is safe.
- Keep your plugin list lean, and remove anything unused.
- Choose hosting with enough memory for your traffic and plugins.
- Use monitoring so a 500 error is caught in minutes, not hours. What monitoring covers is explained in a separate guide.
TalkToWP checks every site every 5 minutes on every plan, Free included. When a 500 error appears, it tells you which plugin or update caused it and hands you the fix in plain English, so you do not need to dig through logs. The free plan covers one site, and you can sign up here.
Frequently Asked Questions
Is a 500 error my fault or my host’s?
It can be either. If it started right after you changed something, such as a plugin update or a file edit, it is probably on your side. If nothing changed and it affects other sites on the same host, ask your host to check their server.
Why does the 500 error only affect wp-admin?
Dashboard-only errors usually come from a plugin that loads in admin, or from a memory limit, as admin screens need more memory. Test by renaming the plugins folder and raising the memory limit.
Will regenerating permalinks delete my content?
No. Saving permalinks only rewrites the rewrite rules in .htaccess. Posts and pages are untouched. Your URL structure stays the same unless you choose a different one.
What is the difference between a 500 and a 502 or 503 error?
A 500 is a generic server failure. A 502 or 503 usually means a gateway or temporary overload, such as a server being busy or restarting. The fixes differ, so check the exact code before you start.
I do not have an .htaccess file. Is that a problem?
On Nginx servers there is none, which is normal. On Apache or LiteSpeed, a missing file can break pretty permalinks. Go to Settings > Permalinks and save to recreate it.
