The short answer
A 500 error means something failed while the server was building the page, usually a plugin, a broken .htaccess file or a memory limit. A 502 means the web server asked PHP for the page and didn’t get a proper answer back, and a 503 means the server is too busy or deliberately unavailable. Your host’s error log for the exact time of the error nearly always says which it is.
These errors look alike, a plain page with a number and a few words, and they all mean visitors can’t see your site. But the number is a useful clue. It tells you roughly where in the chain things went wrong: in WordPress itself, in the part of the server that runs PHP, or in the server’s ability to cope with the traffic it’s getting.
Is this what you’re seeing?
- “500 Internal Server Error” on every page, or only on some, such as wp-admin or the checkout.
- “502 Bad Gateway”, sometimes on a Cloudflare-branded page, or from a server that runs Nginx.
- “503 Service Unavailable”, or “Service Temporarily Unavailable”, that comes and goes.
- Elementor shows a “Server Error (500)” when you try to edit or save a page, while the live site is fine.
- The error started after an update, a plugin install, or a change to your hosting.
- It appears at busy times, or when lots of people arrive at once.
What usually causes it
500: a plugin, theme or code error
When PHP hits a fatal error, recent versions of WordPress usually show “There has been a critical error on this website”. But some failures happen before WordPress can show that message, and the server returns a plain 500 instead. The cause is the same: a plugin, the theme or a code snippet. How to tell: the error started after an update or change, and the PHP error log mentions a file in wp-content/plugins/ or wp-content/themes/. My guide to the critical error message covers this in detail.
500: a damaged .htaccess file
On Apache and LiteSpeed servers, which a lot of shared hosting uses, a file called .htaccess in the site’s main folder holds rules for the web server. One wrong line, often added by a security, caching or redirect plugin, gives a 500 on every page. How to tell: the whole site, including images and wp-admin, shows the same 500, and your host’s error log mentions .htaccess or an “invalid command”.
500: running out of memory or time
Each request gets a set amount of memory and a time limit. Page builders, imports, big reports and backups can go over. This is the usual reason for Elementor’s “Server Error (500)” in the editor. How to tell: the error log says “Allowed memory size … exhausted” or “Maximum execution time exceeded”, and the error only happens on certain pages or tasks. Elementor’s System Info screen shows the memory limit it can see.
502: PHP isn’t answering
Many servers split the work: a web server such as Nginx takes the request and passes it to a separate PHP service (often PHP-FPM) to build the page. A 502 means that hand-off failed. PHP crashed, was restarted, or was too busy to reply. If you use Cloudflare, it can also show a 502 when your server sends back something it doesn’t understand. How to tell: the error is brief and comes and goes, often at busy moments, and the host’s logs mention the PHP service or “upstream”.
503: the server is overloaded, or paused on purpose
A 503 means the server is refusing requests for now. On shared hosting, that’s often the host limiting your account because it’s hit its share of memory, CPU or processes, frequently because of bots. WordPress also returns a 503 while an update is running, with the “Briefly unavailable for scheduled maintenance” message. How to tell: check your control panel’s resource-usage figures for the time of the error. If you see the maintenance message and no update is running, see stuck in maintenance mode.
What you can safely try
Take a backup first, through your host’s control panel if you can’t get into WordPress. Every step here can be undone.
- Note the exact error, the time and the page. Check your host’s status page, in case it’s a wider problem on their side.
- Open the error log in your hosting control panel (often called “Errors” or “Error log”) and look at the entries for that time. If the panel doesn’t have one, ask your host to send you the lines for that minute.
- If the error started after an update, deactivate that plugin. If you can’t log in, rename its folder in
wp-content/plugins/, for example fromplugin-nametoplugin-name-off, and rename it back to undo. - For a 500 on every page, on Apache or LiteSpeed hosting: in the file manager, turn on “show hidden files”, then rename
.htaccessto.htaccess-old. If the homepage comes back, log in and go to Settings → Permalinks and click Save Changes without changing anything. WordPress writes a fresh, standard file. If renaming made no difference, rename the file back. - For a 503 or 502 that comes and goes, look at your host’s resource-usage graphs and check that page caching is switched on, so most visitors don’t need PHP at all.
- For Elementor’s editor 500, check the memory limit in Elementor’s System Info and ask your host whether it can be raised. Hosts set the ceiling, so a line in
wp-config.phpcan’t go above what they allow.
When to stop and get help
- The log is empty, or the lines don’t point to a plugin or theme.
- The errors come and go and you can’t tie them to anything you did.
- The site takes orders or bookings, and customers are seeing errors at checkout.
- Your host says the server is fine and it’s a WordPress problem, and you don’t know where to go next.
- You run your own server or cloud instance, and the fix involves PHP-FPM, Nginx or memory settings.
- The renamed
.htaccessheld rules you need, such as redirects or security settings, and you need them put back properly.
A real example
On a membership and events site, server logs from an outage showed a burst of crawler activity followed by 500 errors, errors connecting to its Redis cache, timeouts and the server running out of memory. The 500s weren’t the cause. They were one symptom of a server that, most likely, was being asked to run more PHP processes at once than its memory could hold. I tell the full story in my site goes down when bots crawl it.
The same lesson came up on a smaller site behind Cloudflare that kept returning 524 timeouts, where the server had run out of its allowance of CPU. That one is in my case note on fixing intermittent Cloudflare 524 errors. In both cases the error number was the start of the investigation, not the answer. The first error in a log is often just the first thing to fall over.
Getting it fixed
Send me the error, the time and what changed just before, if anything did. I take a full backup, read the server and PHP logs for that time, and fix the cause rather than restarting things until it goes away. A WordPress repair is a fixed £119, which covers finding the problem and up to 90 minutes of fixing it. Most repairs fit in that, and you’re never charged more without agreeing first.
If your site is down and it’s costing you money right now, see emergency WordPress support for a faster start.
Questions
Can someone fix a WordPress 500 internal server error remotely?
Yes. I need access to your hosting control panel or SFTP, and a WordPress login if you can still get in. Most 500 errors are fixed from the error log and the files, without anyone needing to be on site.
Elementor is showing a 500 server error, but the site works. Why?
The editor does much more work than the live page, so it’s the first thing to hit a memory or time limit. It can also be a plugin that clashes with the editor only. Check the memory limit in Elementor’s System Info, then try the editor with other plugins switched off on a staging copy. If the editor won’t load at all, see Elementor stuck on the loading screen.
My site shows a 502 Bad Gateway on a Cloudflare page. Is Cloudflare broken?
Rarely. Cloudflare’s error pages show which link in the chain failed: your browser, Cloudflare or your host. If it marks your host as the problem, the fix is on your server, even though the page says Cloudflare. 521, 522 and 524 errors also point to the server not answering, or answering too slowly.
The 503 error comes and goes. Do I need a bigger hosting plan?
Not necessarily. Find out first what’s using the resources. Bots, uncached pages and heavy scheduled jobs are common, and fixing them costs less than a bigger plan. See my WordPress site keeps going offline.
Is it safe to delete the .htaccess file?
Rename it rather than deleting it. It can hold redirects, security rules and caching settings as well as WordPress’s own lines, and once it’s deleted those are gone. Renaming lets you put it back, or copy the rules you need into the new file.
Written by Peter Claridge, who fixes WordPress sites for businesses across the UK from Reading. Last checked on WordPress 7.1, November 2026.