A 500 error means something on your server broke, but not in a way the server could explain

When you see "500 Internal Server Error" or "Unable to Handle This Request," your web server received a request it could process — the address was correct, the file existed — but something went wrong while trying to send back the page. Unlike a 404 error, which means the file does not exist, a 500 error means the server itself encountered a problem it could not recover from.

The server tried to run code, connect to a database, or perform some other task behind the scenes. That task failed. The server did not know how to describe the failure to your browser in a useful way, so it sent back a generic 500 message instead. This is frustrating because it tells you almost nothing about what actually broke.

The error almost always lives on the server side — in your hosting account, in your website's code, or in the software running your site. It is not your browser, not your internet connection, and not something you can fix by clearing your cache or restarting your computer.

Key Takeaways

  • A 500 error means the server encountered an unexpected problem while processing a request, usually in your website's code or configuration.
  • Check your server's error logs first — they contain the actual error message that the 500 page hides from visitors.
  • Common causes include a plugin or theme conflict, a misconfigured .htaccess file, memory limits that are too low, or a database connection failure.
  • If you cannot access your hosting control panel or error logs, contact your hosting provider's support — they can check server logs and restart services.
  • A 500 error on one page only usually points to a specific file or plugin; an error across your entire site usually points to a configuration problem or server issue.

Where to find the real error message your server is hiding

Your server knows what went wrong. It just did not tell your visitors. The actual error message lives in your server's error log, which you can usually access through your hosting control panel.

Log into your hosting account (cPanel, Plesk, or whatever your host uses) and look for a section called "Error Logs," "Logs," or "Diagnostics." Open the error log for the domain that is showing the 500 error. You will see timestamped entries. Find the one that matches when you tried to load the page — it will contain the real error message: something like "Allowed memory size exhausted," "Call to undefined function," "MySQL server has gone away," or "Permission denied."

That message tells you what actually broke. Write it down or take a screenshot. If you cannot find the error logs in your control panel, or if your hosting provider does not give you access to them, you will need to contact support and ask them to check the server error logs for the time you saw the 500 error.

The most common causes and how to narrow them down

A 500 error on your entire site — every page shows the error — usually points to a server configuration problem or a file that controls how the server runs. A 500 error on only one page or one section usually points to a specific plugin, theme, or piece of code.

If the error is site-wide, check your .htaccess file first. This file lives in your root directory (the main folder of your website) and controls how the server handles requests. A single typo or misconfiguration can break the entire site. Connect via FTP or use your hosting control panel's file manager, find .htaccess, and read a copy as backup. Then try renaming it to .htaccess.old. Reload your site. If it works, the .htaccess file was the problem. You can then edit it carefully or restore the backup and fix the specific line.

If the error is on one page only, the problem is usually a plugin, a theme function, or custom code on that page. If you use WordPress, try deactivating all plugins and reloading the page. If the error goes away, reactivate plugins one at a time until the error returns — that plugin is the culprit. You can then update it, replace it, or contact the plugin author. If you use another platform, look for any custom code or extensions that run on that specific page.

Check your server's memory limit. WordPress and other platforms have a PHP memory limit — usually 64 MB or 128 MB — and if your site tries to use more, it fails with a 500 error. You can increase this by editing your wp-config.php file (WordPress) or by asking your host to raise the limit. Add this line to wp-config.php before the line that says "That's all, stop editing": define('WP_MEMORY_LIMIT', '256M');

Database connection problems and what they look like

If your site uses a database — WordPress, Drupal, most content management systems do — a 500 error often means the server cannot reach the database or the database credentials are wrong.

Check that your database server is running. Log into your hosting control panel and look for "Databases" or "MySQL." You should see your database listed and marked as "Running" or "Active." If it shows as stopped or offline, restart it. If you cannot restart it yourself, contact your host.

Verify your database credentials are correct. In WordPress, these live in wp-config.php: the database name, username, password, and host. If you recently changed your database password or moved your site to a new server, these credentials may be out of sync. Check them against what your hosting control panel shows. If they do not match, update wp-config.php with the correct values.

If your error log says something like "MySQL server has gone away" or "Lost connection to MySQL server," the database server crashed or is overloaded. Contact your hosting provider. They may need to restart the database service or investigate why it is crashing.

When to contact your hosting provider instead of troubleshooting yourself

If you cannot access your hosting control panel, cannot find error logs, or the error log shows a server-level problem (like "PHP Fatal error: Out of memory" despite raising the limit, or "Permission denied" on system files), you have hit the limit of what you can fix yourself.

Contact your hosting provider's support and tell them: the domain showing the error, when it started, and what the error message says (if you found it). Ask them to check the server error logs and tell you what they see. A good hosting provider can usually identify the problem in minutes — a misconfigured server setting, a service that crashed, a resource limit you have hit, or a file permission issue.

If your host says "We cannot help with custom code or plugin issues," that is fair — they support the server, not your website's code. But they should still be able to tell you what the actual error is. Once you know the error, you can fix it yourself or hire a developer.

Preventing 500 errors before they happen

Keep your platform and plugins updated. Most 500 errors come from outdated code that conflicts with newer versions of PHP or other server software. Set WordPress and other platforms to update automatically, or check for updates weekly.

Test changes on a staging site before pushing them to your live site. If you are installing a new plugin, changing your theme, or editing code, do it on a copy of your site first. If it causes a 500 error, you catch it before visitors see it.

Monitor your server resources. If your site is growing and getting more traffic, you may eventually hit memory limits or database performance limits. Watch your hosting control panel for warnings about resource usage. If you are consistently near your limit, upgrade your hosting plan before you hit the ceiling and start seeing 500 errors.

Keep backups. If a 500 error is caused by a bad update or a plugin conflict, the fastest fix is often to restore from a backup taken before the problem started. Most hosting providers include automated backups, but verify they are actually running and that you can restore from them.

Frequently Asked Questions

Why does the error message say "Internal Server Error" instead of telling me what is actually wrong?

The server encountered an error it did not expect and did not know how to describe safely to a visitor. Showing the real error message to the public could expose sensitive information about your server's setup, so the server sends a generic message instead. The real error is always in the server's error log, which only you and your host can see.

Does a 500 error mean my site is hacked?

Not necessarily. A 500 error usually means a file is broken, a plugin conflicts with your server setup, or a resource limit was hit. Hacking is one possible cause, but it is not the most common one. If you suspect a hack, check your error logs for suspicious activity, scan your site with a security plugin, and ask your host to review server logs for unauthorized access.

If I see a 500 error, should I take my site offline?

Not when ready. If the error is on one page only, visitors can still use the rest of your site. If it is site-wide, yes, consider taking it offline or showing a maintenance message while you fix it — a 500 error on every page looks worse than a "We are down for maintenance" message. Most hosting control panels have a way to show a maintenance page while you troubleshoot.

Can I fix a 500 error by restarting my computer or clearing my browser cache?

No. The error is on the server, not on your computer. Restarting your computer or clearing your cache will not help. The server needs to be fixed, or the code running on it needs to be corrected.

What if the error log is empty or does not show anything helpful?

Some hosting providers do not log errors by default, or errors are logged elsewhere. Ask your host where error logs are stored and whether they need to enable logging. If logging is on but the log is empty, the error may be happening before the logging system can catch it — usually a PHP configuration problem that your host will need to investigate.