
A 500 Internal Server Error means the server ran into an error while building the page but won't show the visitor why. The cause is almost always written in the server's error log. The most common culprits are a broken .htaccess rule, site code that isn't compatible with a new PHP version, an insufficient PHP memory limit, wrong file permissions and a faulty plugin. The first step isn't guessing; it's opening the error log in your hosting panel.
A 500 error can appear across the whole site, on a single page, or only during one action (submitting a form, paying). Which one is a clue.
Are 500, 502, 503 and 504 the same?
All are server-side errors, but they point to different places:
- 500 Internal Server Error: there's an error in the site's own code or server configuration. A generic 'something went wrong'.
- 502 Bad Gateway: a front server (such as Cloudflare or a proxy) didn't get a valid response from the actual server behind it. The application behind may have crashed or be restarting.
- 503 Service Unavailable: the server temporarily can't serve requests. Maintenance mode, overload, or the host limiting the account for exceeding resources.
- 504 Gateway Timeout: the front server waited too long for the server behind it and gave up. A slow database query or a long-running task.
This article focuses on 500; for 502 to 504, the error log and contacting your host are the first step in the same way.
1. When did it start?
The last change usually tells you the cause. Was a plugin or theme updated? Was a redirect rule added to .htaccess? Did the host change the PHP version? Was the site moved to another server? Undoing the change is often the fastest fix.
2. Open the error log
In cPanel, the 'Errors' page shows the server's latest error lines. In Plesk, look at the 'Logs' section under the domain. In the log you'll see a file name and line number in the site's folder, or a phrase like 'Invalid command', 'Premature end of script headers' or 'Allowed memory size exhausted'. That phrase tells you which section below to read.
If you use WordPress, you can also turn on WordPress's own error log; we explain the steps in WordPress white screen error. A white screen and a 500 error often have the same root.
3. The .htaccess file
On hosting that runs Apache or LiteSpeed, one bad line in .htaccess causes a 500 error across the whole site. If the log mentions 'Invalid command' or '.htaccess', this is most likely the cause.
It's easy to test: show hidden files in the file manager, rename .htaccess to .htaccess-backup and refresh the site. If it loads, the problem is in that file. On WordPress, going to Settings, Permalinks in the dashboard and pressing 'Save' without changing anything creates a clean .htaccess. Add your earlier redirect rules back from the backup one at a time, testing each time.
4. PHP version and memory
When hosts end support for old PHP versions, they move accounts to the new version in bulk. A site or plugin that hasn't been updated in years may not run on it. Switching back one version in the hosting panel's PHP settings brings the site back temporarily. The lasting fix is to update the incompatible code; unsupported PHP versions don't receive security updates.
If the log says 'Allowed memory size exhausted', PHP's memory limit isn't enough. Raise memory_limit in the hosting panel (256M is enough for most sites), or ask your host if your plan doesn't allow it.
5. File and folder permissions
Permissions decide whether the server can read and run your files. The general rule: folders 755, files 644. After a migration or bulk upload, permissions may have ended up far too open, like 777, or too closed, like 600. Some servers refuse to run files with 777 permissions for security reasons and return a 500. Check permissions in the file manager or ask your host to fix them in bulk.
6. A plugin, module or custom code
If the error appears only on one page or during one action, a plugin or custom code running there is responsible. For example, if you get a 500 only at the payment step, look at the payment plugin; only on form submission, look at the form plugin. Disable the plugin and try again. If you can't get into the dashboard, renaming the plugin's folder does the same job; the steps are in I can't log in to WordPress admin.
7. Server load and resource limits
If the error comes and goes, with the site sometimes loading and sometimes not, server capacity may be the issue. On shared hosting, each account has limits on CPU, memory and concurrent processes. A bot attack, a busy campaign day or a heavy plugin can push past them. The resource usage graph in the hosting panel shows this. You may need caching, bot blocking or a stronger plan. We explain the differences between hosting types in shared hosting, VPS and cloud.
What to tell your host
If you can't find the problem, open a support ticket and include: the URL where the error appears, when it began, your most recent change and the relevant line from the error log. The difference in response time between a ticket that says 'my site won't open' and one with the error line attached is measured in hours.
The effect on Google
A few hours of 500 errors leave no mark on rankings. If Google keeps getting 5xx errors on a page, it first crawls less often; if the error lasts for days, pages start dropping out of the index. After fixing it, check the server error row in Search Console's Pages report and test important pages with URL Inspection.
Recurring 500 errors are a sign that the site needs maintenance. Watching updates, PHP compatibility and server resources regularly is what our maintenance and support plan covers; if your site is throwing errors right now, write to us directly.
Frequently Asked Questions
Is a 500 error caused by the visitor or the site?
The site. A 500 is a server-side error; clearing the visitor's browser or trying another device won't fix it.
Will deleting the .htaccess file break my site?
Rename it instead of deleting it. On WordPress, permalinks and redirects depend on this file; after testing, you can regenerate it from the Permalinks page and add old rules back from the backup.
Why does the 500 error only appear on the payment page?
The payment plugin or the code connecting to the payment provider at that step is failing. The file path in the error log usually shows which plugin; update it or contact its support.
Blog posts are for general information only and are not a substitute for legal, financial or technical advice.
