A server error is a message your website shows when it cannot load a page correctly, usually because of a problem on the web server or in your site's setup. This guide helps you identify exactly which error you have, work out whether it is your site or your host, and jump straight to the step-by-step fix.
WP_DEBUG_LOG) names the real cause when the on-screen message is vague.First, take a breath. Seeing a bare error page where your website should be is stressful, especially if the site is your business. The good news is that almost every server error is fixable, often in a few minutes, and your content is very rarely lost. An error page is a symptom, not a death sentence for your site.
This page is the front door for every hosting error we cover. Instead of guessing, you will do two quick things: identify which error you actually have, then follow the link to the exact guide that fixes it. If you are not sure where to begin, read the next two sections, then use the error table to route yourself to the right place.
This guide is written for site owners and beginners, not server engineers. If a term looks technical, we define it the first time it appears. For the full library of hosting fixes and explainers, you can always return to the Hosting Help Center.
One reassurance before you start: an error page almost never means your files, posts, or images are gone. In the vast majority of cases the content is safe on the server and only the connection between the visitor and that content is broken. Once you find and undo the cause, the site returns exactly as it was. That is why the calm, methodical approach below beats panicked guessing every time.
Every time your browser asks a web server for a page, the server answers with a short numeric HTTP status code — a three-digit number that reports whether the request succeeded or failed. HTTP (HyperText Transfer Protocol) is simply the language browsers and servers use to talk to each other. When everything works, the code is 200 OK and you never see it. When something breaks, the server sends an error code and shows it on screen instead of your page.
The first digit tells you the family the error belongs to. For troubleshooting, two families matter most:
4xx errors are client-side or request-side. "Client" means the request itself — the exact address (URL), your browser, permissions, or a rule your own site is enforcing. A 404 Not Found or 403 Forbidden usually means the page or access being requested is missing or blocked, not that the server has crashed. In practice, 4xx problems are often something you can fix inside your own site or settings.
5xx errors are server-side. The request was valid, but the server could not complete it. A 500, 502, 503, or 504 means something failed while the server was building your page — a crashed process, an overloaded machine, a bad configuration, or a broken connection between servers. Some 5xx errors are your host's responsibility; many are triggered by your own plugin, theme, or code.
The practical takeaway for a site owner: the code narrows down where to look. A 4xx points you toward the specific page, a permission, or a redirect rule. A 5xx points you toward the server, the error log, and whatever you most recently changed. Neither code, on its own, tells you the exact cause — that is what the log and the steps below are for.
You will also see errors that are not standard HTTP codes. WordPress adds its own messages, such as "Error establishing a database connection" and the blank "white screen of death," which behave like 5xx problems but come from the application rather than the web server. Treat them the same way: find out what changed, read the log, and match the message to its fix. Whatever the wording, the goal is always the same — turn a vague on-screen message into a specific, named cause you can act on.
Match the error you are seeing to the row below. Each one links to a dedicated, step-by-step fix. If your exact message is not listed, the diagnosis steps further down work for any error.
| Error | Type | What it means in plain English | Fix guide |
|---|---|---|---|
| 403 Forbidden | 4xx | The server understood the request but refuses access — often a file permission, a security rule, or a locked folder. | Fix 403 & 404 errors |
| 404 Not Found | 4xx | The page or file at that address does not exist — a broken link, a deleted page, or a wrong URL. | Fix 403 & 404 errors |
| 500 Internal Server Error | 5xx | A catch-all: something failed on the server but it cannot say what. Usually a plugin, theme, code, or .htaccess problem. |
Fix the 500 Internal Server Error |
| 502 Bad Gateway | 5xx | One server got an invalid response from another server it relies on — often a brief backend or PHP hiccup. | Fix the 502 Bad Gateway error |
| 503 Service Unavailable | 5xx | The server is temporarily unable to handle the request — overload, maintenance mode, or exhausted resources. | Fix 503 & 504 errors |
| 504 Gateway Timeout | 5xx | A server waited too long for a response from another server and gave up — usually something running too slowly. | Fix 503 & 504 errors |
| Error establishing a database connection | Site | WordPress cannot reach its database — wrong login details, a crashed database, or the server being overloaded. | Fix the database connection error |
| White screen of death | Site | A blank white page with no error text — usually a PHP crash from a plugin, theme, or a memory limit being hit. | Fix the WordPress white screen |
Note that the last two are not standard HTTP codes — they are WordPress-specific messages — but they are among the most common things site owners see, so they belong here. If you are getting a broken response inside the WordPress editor rather than a full page error, see the guide to the "Updating failed / JSON response" error.
If your error is not in the table, or you want to understand the cause before you act, work through these checks in order. They apply to every error and take only a few minutes.
wp-admin login. If only one page fails, the problem is that page (a broken link, a redirect, or its content). If everything fails, the problem is site-wide — usually the server, a core plugin, or the database.wp-config.php: set define('WP_DEBUG', true); and define('WP_DEBUG_LOG', true);, reload the broken page, then read /wp-content/debug.log. The log usually names the exact file or plugin at fault. By the end of these five checks you will know three things: which error you have, whether it is one page or the whole site, and whether it started after your own change. That is enough to pick the right fix guide with confidence.
This is the single most useful question in troubleshooting, and the one beginners find hardest to answer. Use the callout below as a quick rule of thumb.
Point to your host when:
Point to your site when:
.htaccess makes it disappear.When in doubt, the "what changed" test wins. Servers rarely break on their own for no reason; sites frequently break right after an update. If you made a change in the last hour and the site broke, start by undoing that change.
Before you edit any file or change any setting, run through this short checklist. It protects your site and often fixes the error on its own.
wp-config.php, .htaccess, or your database, take a full backup of your files and database. One typo in a core file can take the whole site offline, and a backup is your undo button. If you are not sure how, follow the website backups guide before continuing.
wp-admin, deactivate all plugins; if the error clears, reactivate them one by one to find the culprit. If you are locked out, rename the /wp-content/plugins folder over SFTP or the File Manager to disable them all at once..htaccess file. A corrupt .htaccess (the Apache server's rules file) causes many 500 and 403 errors. Rename it to .htaccess_old; if the site returns, regenerate a clean one by re-saving your permalinks in WordPress.Contact your host's support when the diagnosis points to the server rather than your site: every site on the account is down, the error follows a traffic spike, the status page shows an incident, or the error log mentions a server process, resource limit, or database service you cannot control. There is no shame in asking early — a good host will check server logs you cannot see.
You will get a faster answer if you give support the right details up front:
502 Bad Gateway)..htaccess.Handing over this summary turns a slow back-and-forth into a single, useful ticket.
You cannot avoid every error, but a few habits make them rare and easy to recover from:
A 4xx error is client-side or request-side: the problem is with the request itself — a wrong URL, a missing page, or a permission that blocks access, like 404 Not Found or 403 Forbidden. A 5xx error is server-side: the request was fine, but the server failed to complete it, like a 500 or 503. In short, 4xx usually means "check the page or your site's rules," and 5xx means "check the server, the log, and what you last changed."
You have two main options. In your hosting panel (hPanel or cPanel), open the Error Logs or Metrics section and read the most recent lines. For a WordPress-specific log, add define('WP_DEBUG', true); and define('WP_DEBUG_LOG', true); to your wp-config.php file, reload the broken page, then open /wp-content/debug.log. The last few lines usually name the exact plugin, theme, or file causing the error. Turn WP_DEBUG back off when you are done.
If a single page fails while the rest of the site works, the problem is specific to that page rather than the server. Common causes are a broken or looping redirect, a permalink or .htaccess rule, a plugin that only runs on that page type, or content the server cannot process (such as a very large query). Because the rest of the site is fine, you can troubleshoot safely: check the page's redirect, re-save your permalinks, and disable any plugin tied to that page.
Ask what changed. If the error appeared right after you updated a plugin, switched a theme, or edited a file, it is almost certainly your site — undo that change first. If every site on your server is down, the error followed a traffic spike, or it clears when the host reboots, it points to your host. When you cannot tell, deactivate your plugins and restore a recent backup; if that fixes it, the cause was on your side.
Sometimes. Temporary 502, 503, and 504 errors caused by a brief overload or a server restart often clear on their own within a few minutes. But errors caused by a bad plugin, a corrupt .htaccess, wrong database details, or a code edit will not fix themselves — they stay until you undo the change or repair the cause. If an error persists for more than about ten minutes, treat it as something you need to fix rather than wait out.
It means WordPress loaded but could not reach the database that stores your content. The usual causes are incorrect database login details in wp-config.php, a database server that has crashed or is overloaded, or corrupted database tables. Because it takes the whole site offline, it feels alarming, but it is a well-understood problem with a clear fix — follow the database connection error guide.
A blank white page with no error text is the WordPress "white screen of death." It usually means PHP crashed while building the page — most often because a plugin or theme hit an error, or the site ran out of memory. Turning on WP_DEBUG normally reveals the hidden message, and deactivating plugins or raising the PHP memory limit usually restores the site. The white screen guide walks through it.
A server error looks scary but is almost always fixable. Read the status code to learn whether the problem is request-side (4xx) or server-side (5xx), use the error table to jump to the right fix, and answer the "what changed?" question to decide whether it is your site or your host. Check the error log for the real cause, and back up before you edit anything.
Next step: the most common site-down error is the database one, so if you are unsure which guide you need, start with how to fix "Error establishing a database connection". And before you make any change, set up reliable backups with the website backups guide so recovery is always one click away.
WP_DEBUG and WP_DEBUG_LOG).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