A 500 Internal Server Error is a generic message that means the server hit a problem but can't say exactly what. The real cause is usually in the error log. Most often it is a corrupted .htaccess file, an exhausted PHP memory limit, or a plugin or theme conflict, and each is fixable in minutes.
.htaccess, a hit PHP memory limit, a plugin or theme conflict, wrong file permissions, or corrupted core files..htaccess, raise the memory limit, and deactivate plugins in that order — they solve most cases.You loaded your website and instead of your pages you got a blank screen that says 500 Internal Server Error, HTTP 500, or The server encountered an internal error. Maybe it happened right after you installed a plugin, edited a file, or updated something. Maybe it appeared on its own. Either way, the site is offline and you want it back.
Take a breath — this is one of the most common hosting errors, and it is almost always fixable in a few minutes once you find the cause. This guide is for site owners on shared or WordPress hosting who have access to a hosting control panel or FTP (a way to move files to and from your server). It is part of our wider server errors guide, which covers the whole 5xx family.
Before you change anything, answer three quick questions. Your answers point straight at the likely cause and save you from guessing.
Does it happen on every page or just one? A site-wide 500 usually points to .htaccess, the PHP memory limit, or a broken plugin. A 500 on a single page or action often points to one specific script or a permissions problem on one folder.
Did it start right after a change? If the error appeared just after you updated WordPress, installed a plugin, switched themes, edited .htaccess, or changed your PHP version (the version of the language your site runs on), that change is your prime suspect. Undo it first.
What does the error log say? This is the single most useful step. Open your hosting panel and look for Error Logs (in cPanel and hPanel it sits under "Metrics" or "Advanced"). On WordPress you can also switch on logging by adding define('WP_DEBUG_LOG', true); to wp-config.php, then reading the file it writes to wp-content/debug.log. The log names the file and line that failed, which turns a mystery into a to-do.
Every time a browser asks for a page, the server answers with a three-digit HTTP status code — a short number that says how the request went. Codes in the 500 range (5xx) all mean "the server had a problem." The 500 Internal Server Error is the most generic of these: the server knows something went wrong while building your page, but it either can't or won't say exactly what on the public screen.
That vagueness is deliberate. Showing the raw error to every visitor could leak file paths and other details an attacker could use, so the server hides the specifics and shows a plain 500 instead. The specifics are written to your error log — a private file where the server records what really failed. That is why the log is the fastest route to a fix: the screen says "something broke," and the log says "this exact file broke on this line."
So the 500 is a symptom, not a diagnosis. Your job is to work out which underlying cause triggered it.
A 500 error has six common causes. Match your situation to the likely one, then follow the ordered steps in the next section — they walk through all six from easiest to hardest.
| Likely cause | Typical sign | Fix it in |
|---|---|---|
Corrupted .htaccess file | Whole site down, often after a plugin or permalink change | Step 3 |
| PHP memory limit exhausted | Error on heavy pages; log says "allowed memory size exhausted" | Step 4 |
| Plugin or theme conflict | Started right after an install or update | Steps 5–6 |
| Wrong file or folder permissions | Log mentions "permission denied" | Step 7 |
| Corrupted core files | Error remains after all other fixes | Step 9 |
| Incompatible PHP version | Started after a PHP version change | Step 8 log |
Work through these in order. Test your site after each step — the moment it loads again, the last change you made was the cause. Stop there.
Ctrl+F5 (or Cmd+Shift+R on Mac) to bypass your cache. If the site returns, you are done..htaccess file. The .htaccess file is a small server config file in your site's root folder; one bad line takes the whole site down. Using File Manager or FTP, rename .htaccess to .htaccess_old and reload your site. If it works, the old file was the culprit. In WordPress, generate a clean one by going to Settings → Permalinks and clicking Save Changes without editing anything.define('WP_MEMORY_LIMIT', '256M'); to wp-config.php, or set memory_limit = 256M in your panel's PHP settings. Our PHP settings guide shows exactly where each option lives.wp-content/plugins folder to plugins_old — this switches every plugin off at once. If the site returns, rename it back, then enable plugins one at a time, reloading after each, until the error reappears. That plugin is the problem.755 and files to 644. Never set anything to 777 — it lets anyone write to the file and is a serious security risk.define('WP_DEBUG', true); and define('WP_DEBUG_LOG', true); to wp-config.php, reload the failing page, then open wp-content/debug.log. It names the exact file and line — including whether an incompatible PHP version is to blame — so you know precisely what to fix.wp-admin and wp-includes folders over the top of the old ones via FTP. This replaces the engine without touching your content, plugins, or uploads..htaccess or wp-config.php without a backup, and never set files or folders to 777. A single wrong character in these files can take the whole site down, and 777 permissions let anyone on the server write to your files.Editing config files with no backup. People often open .htaccess or wp-config.php, make a change, and have no way back when it breaks. Always copy the file first (Step 1). A backup turns a disaster into a two-minute undo.
Using 777 permissions to "just make it work." Setting everything to 777 can clear a permissions 500, but it opens your site to attackers. Stick to 755 for folders and 644 for files — that is both correct and safe.
Assuming it's a plugin when the log says otherwise. It is tempting to disable plugins and hope. But if the error log points at a memory limit or a permissions problem, chasing plugins wastes time. Read the log first, then fix what it actually names.
Test changes on a staging site. A staging site is a private copy of your live site where you can try updates safely. Update plugins and themes there first, confirm nothing breaks, then push the change live. Most good hosts include one-click staging.
Update carefully and one thing at a time. When you update plugins, themes, or WordPress, do it in small batches and check the site after each. If a 500 appears, you will know exactly which update caused it.
Give your site enough resources. Many 500 errors are really memory or resource limits being hit. Keep a comfortable PHP memory limit and make sure your plan has room for your traffic and plugins. Our PHP settings guide covers the numbers that matter.
Keep PHP current. Running a supported, up-to-date PHP version avoids compatibility 500s and keeps your site faster and safer. Check your host's PHP selector every few months.
It means the server ran into a problem while building your page but can't say exactly what on the public screen. It is a generic 5xx (server-side) status code. The real cause — a bad .htaccess, a memory limit, a broken plugin, and so on — is written to your error log.
Usually yours, because it is most often triggered by something on your site, such as a config file, plugin, or memory limit. It is your host's problem when nothing on your side changed, the error is intermittent, or other sites on the same server are failing too. The error log tells you which.
Read your error log. Open Error Logs in your hosting panel, or switch on WordPress logging by adding define('WP_DEBUG_LOG', true); to wp-config.php and reading wp-content/debug.log. The log names the exact file and line that failed, which points straight at the fix.
The .htaccess file gives the server line-by-line instructions, and the server refuses to run if any line is invalid. A bad plugin rule, a broken redirect, or a stray character is enough to return a 500. Renaming the file to .htaccess_old disables it so you can test, then Settings → Permalinks → Save rebuilds a clean one in WordPress.
Sometimes. If it was a brief server hiccup or a short traffic spike, reloading after a minute may clear it. But if it stays after a reload, something is genuinely broken and it will not fix itself — you will need to work through the steps above to find the cause.
A 500 means the server itself hit an internal problem while building your page, often caused by your site's own code or config. A 502 Bad Gateway means one server got an invalid reply from another server it relies on, which is more often host-side. If you see a blank white page with no error text at all, that is usually the WordPress white screen of death, a close cousin of the 500.
A 500 Internal Server Error is the server's way of saying "something broke" without the details — and the details are waiting in your error log. Back up, then work through the fixes in order: reload, regenerate .htaccess, raise the memory limit, disable plugins and the theme, correct permissions, read the debug log, refresh core files, and only then call your host. One of these clears almost every case. To keep it from happening again, browse the rest of our server errors guide, which walks through each related 5xx problem and how to prevent it.
When a 500 keeps coming back because of resource limits
If you have fixed the .htaccess, disabled the guilty plugins, and raised the memory limit, but the 500 keeps returning whenever traffic climbs or your log keeps reporting exhausted memory, you have hit a real ceiling: your current plan cannot give your site the resources it needs. That is one of the few 500 causes that is genuinely host-bound rather than a config you can fix. In that situation a better-resourced host removes the ceiling, and you can compare plans to see whether Hostinger fits your needs. If valid at checkout, new users may be able to apply a code such as SPECIAL15 or SPECIAL10, subject to Hostinger's terms.
Affiliate disclosure: if you sign up through this link we may earn a commission, at no extra cost to you. How this works.
When changing hosts won't fix this. A 500 error is usually caused by something inside your site — a faulty plugin or theme, a broken .htaccess rule, or an exhausted PHP memory limit. Move that same site to a new host and the error moves with it. Treat hosting as the cause only when 500s appear as traffic rises, when you are hitting hard resource limits, or when your host cannot show you the error log. Any decent host will raise a memory limit on request. Diagnose first, and migrate only if the evidence actually points at the server.
Because a corrupted .htaccess is a common cause, it helps to know how to manage your site files with the File Manager, FTP and .htaccess.
WP_DEBUG, WP_DEBUG_LOG).memory_limit).The editorial team behind the Bitrich777 Hosting Help Center — practical, tested guides on web hosting, WordPress, servers, DNS, SSL, email, security and migration. Every walkthrough is reproduced on a live host before it is published.
View all guides by the Hosting Team Spotted an error? Tell us