How to fix a 500 internal server error on WordPress
A 500 internal server error means your server hit a problem it could not describe, and on WordPress the cause is usually a broken plugin, a damaged .htaccess file or a PHP limit. Work through the steps below in order and many sites are back quickly.
A 500 internal server error is a generic message. Your web server is saying something went wrong while building the page, but it will not say what. Visitors usually see a plain white page with text such as "500 Internal Server Error", "HTTP Error 500" or "The website is currently unable to handle this request". Some hosts show a branded error page instead. Sometimes only the admin area breaks, or only one page.
The good news is that the real cause is almost always written down in a log file. The steps below help you find it.
Why it matters
A 500 error is not a small thing, even if it only lasts an hour.
- Sales and trust: visitors cannot buy, book or contact you, and many will not come back.
- Search: search engines treat a 500 as a temporary server fault. If it keeps happening for days, pages can drop out of results until the site is stable again.
- Security: error pages and logs can sometimes reveal file paths or software details, and a repeated error can be a sign of a hacked or broken file.
How to check if your site has it
You can confirm this for free in a few ways.
- Open the page in a private browser window and see whether the error appears for everyone, not just you.
- Open your browser developer tools (usually F12), go to the Network tab, reload the page and look at the status of the first request. It will say 500 if this is the problem.
- If you have command line access, run
curl -I https://yourdomain.com/and look at the first line of the answer. - Try the pages separately: the home page, a blog post,
/wp-admin/. Knowing which ones fail narrows down the cause.
If you want this checked automatically, week 29 of SiteMonday is an uptime monitoring report, described on the week 29 page. It finds and explains the problem. Fixing it is still up to you or your developer.
How to fix it on WordPress
Before you change anything, make sure you have a recent backup, or ask your host whether they keep one. If you do not have backups at all, read what to do when you have no website backups. You will need FTP, SFTP or the File Manager in your hosting control panel for most steps.
- Read the error log first. In your hosting panel look for Errors, Error log or Logs (in cPanel it is often under Metrics, then Errors). The last few lines usually name a file and a line number, often inside a plugin or theme folder. That tells you where to focus.
- Turn on WordPress debug logging. Open
wp-config.phpin the site root and, above the line that says to stop editing, add the lines below. Then reload the broken page and readwp-content/debug.log. Remove or set these back to false when you are done.
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
- Rule out a plugin. Using FTP or File Manager, rename the folder
wp-content/pluginstoplugins-off. If the site comes back, rename it again topluginsand then rename individual plugin folders one at a time until the error goes away. The last one you renamed is the culprit. Update it, replace it or remove it. - Rule out the theme. In
wp-content/themes, rename the folder of your active theme. WordPress will fall back to a default theme such as one of the Twenty Twenty series if one is installed. If the error goes away, the theme or its child theme has a fault. - Reset the `.htaccess` file. On Apache servers a damaged
.htaccessis a very common cause. Rename it to.htaccess-old(it may be hidden, so turn on showing hidden files). If the site loads, log in to WordPress, go to Settings, then Permalinks, and click Save Changes. WordPress writes a fresh file. Nginx servers do not use.htaccess, so skip this step there. - Raise the PHP memory limit. If the log mentions allowed memory size exhausted, add
define( 'WP_MEMORY_LIMIT', '256M' );towp-config.php. Some hosts cap memory regardless, so you may also need to change it in the PHP settings of your hosting panel or ask support. - Check the PHP version. An old plugin on a new PHP version, or a new plugin on an old one, can fail with a 500. Most hosting panels let you switch PHP versions (look for PHP Selector, MultiPHP Manager or similar). Try one version up or down and test.
- Check file permissions. Folders are normally set to
755and files to644. Permissions that are too open or too strict can trigger a 500 on some servers. - Replace WordPress core files. If the log points at a file in
wp-adminorwp-includes, download the same WordPress version from wordpress.org and upload fresh copies of those two folders. Do not touchwp-contentorwp-config.php. - Ask your host. If nothing helps, send support the exact time of the error and the last lines of the error log. They can see server level problems such as resource limits, a full disk or a failed module.
The WordPress 500 error guide goes deeper on each step. If you see a blank page rather than an error message, the WordPress white screen guide may fit better.
How to confirm the fix worked
- Reload the home page, a blog post and
/wp-admin/in a private window. - Run the page through your browser Network tab or
curl -Iagain and confirm you get a 200 status, or a normal redirect, not a 500. - Test the things that earn money: contact form, checkout, booking, login.
- Check the error log again a few minutes later. New entries with the same message mean the cause is still there.
- Turn debug mode back off so error details are not stored longer than needed.
How to stop it coming back
- Update carefully. Update plugins, themes and WordPress regularly, but one at a time, and check the site after each. A staging copy is safer for bigger changes.
- Keep backups you have tested. A backup you can restore in minutes turns a 500 error into a small interruption.
- Remove what you do not use. Every unused plugin and theme is one more thing that can break.
- Watch your hosting limits. Repeated memory or CPU errors suggest your plan is too small for your traffic.
- Get alerted early. Uptime monitoring tells you about an error before a customer does. See website down monitoring for what to look for.
When the cause is not WordPress
WordPress is the usual suspect, but not always. A server setting, a full disk or a hosting outage can cause the same message. If you changed nothing and every site on the same server fails at once, contact your host straight away.
Step by step for your platform
- 500 internal server error on WordPress
- 500 internal server error on Apache
- 500 internal server error on Nginx
- 500 internal server error on Laravel
- 500 internal server error on IIS
- 500 internal server error on cPanel
- 500 internal server error on Magento
Questions
What does a 500 internal server error mean on WordPress?
It means the server failed to complete the request and cannot say why. On WordPress the usual causes are a plugin or theme fault, a damaged `.htaccess` file, or a PHP memory or version problem.
Can I fix a 500 error if I cannot log in to WordPress?
Yes. Use FTP, SFTP or your host's File Manager to rename the plugins folder, reset `.htaccess` or edit `wp-config.php`. None of those steps need the WordPress dashboard.
Will a 500 error hurt my Google rankings?
A short outage normally does little harm, because search engines treat 500 as a temporary fault. If it lasts for days or keeps returning, pages can drop out of results until the site is stable again.
Is a 500 error my host's fault or mine?
Either can be true. If the error log names a plugin, theme or WordPress file, it is a site problem. If many sites on the server fail at once or the log shows resource limits, ask your host.
Why does the error only appear on some pages?
Usually one plugin, shortcode or template runs only on those pages. The error log will name the file involved, which helps you find the culprit.
Should I leave WP_DEBUG turned on?
No. Turn it off once you have found the problem. Leaving debug logging on can fill up disk space and keep technical details on the server longer than needed.