How to fix the 503 Service Unavailable error in WordPress
A 503 means the server is running and cannot handle the request right now, because of maintenance or overload. The words on the page show who sent it. That can be WordPress during an update, a plugin, the web server at a hosting limit, or a service in front of the site.
- By
- WP Ministry
- Published
- Tested on
- WordPress 7.1.3, PHP 8.3.35
In short
- A 503 is a temporary refusal. The server answered, and nothing on the site has been deleted.
- If the page says "Briefly unavailable for scheduled maintenance", WordPress sent it during an update, and that message has a page of its own.
- The words on the page show who sent the 503. It can be WordPress, a plugin, the web server or a service in front of the site.
- On shared hosting, reaching the account's memory or process limit can show as a 503 that comes and goes.
- A plugin that answers 503 on purpose is cleared by switching it off from outside the dashboard.
- Google keeps indexed pages through a short 503 and removes addresses that keep returning one.
"503 Service Unavailable" means the server is running, has answered, and says it cannot handle the request right now. The HTTP standard gives two reasons, a temporary overload or scheduled maintenance, and expects either to pass after a delay. A 502 or a 504 is a different report: a server acting as a gateway got an invalid answer from the server behind it (502), or no answer in time (504).
Nothing has been lost. A 503 is about whether the site can be served at this moment, not about your posts, pages or settings. If the page reads "Briefly unavailable for scheduled maintenance. Check back in a minute.", WordPress sent it while installing an update, and the page about that message has the fix. This page covers every other 503.
Where it goes wrong
A page request passes through each of these in turn. This one comes from the web server.
- Browser
- DNS
- HTTPS
- CDN or firewall
- Web server (this error comes from here)
- PHP
- WordPress
- Database and files
What causes it
An update left WordPress in maintenance mode
CommonWordPress answers 503 with "Briefly unavailable for scheduled maintenance. Check back in a minute." while it installs an update. If the update is cut short, it goes on answering that way.
The hosting account has reached its limit on memory or processes
CommonOn shared hosting each account is held to limits. CloudLinux, server software made so that no single site can bring a server down, documents 500 or 503 errors when an account reaches its memory limit or its limit on the number of processes.
Fix: Find out who sent the 503, or Ask the host whether a limit was reached
A plugin is answering 503 on purpose
SometimesA maintenance-mode plugin that was left switched on can send visitors a 503 page. A security plugin can send one to a visitor it has blocked or slowed down.
Fix: Find out who sent the 503, or Switch off the plugin that is answering 503
More requests are arriving than the server can handle
SometimesThe requests can be real visitors or automated ones, such as a flood of login attempts. A server at its limit may refuse requests with a 503 rather than fail in a worse way.
The host is doing maintenance or has a fault
SometimesDuring maintenance, a server's administrators may send all traffic to a 503 page until the work is done.
Fix: Find out who sent the 503, or Ask the host whether a limit was reached
How to fix it
Find out who sent the 503
- Easy
- No risk
- About 5 minutes
- Steps tested on WordPress 7.1.3
WordPress, a plugin, the web server or a service in front of the site can each send a 503. The page and its headers show which one did.
Step 1: Read the words on the page
- "Briefly unavailable for scheduled maintenance. Check back in a minute." WordPress sent it. Follow the page about that message.
- "Your access to this site has been limited by the site owner", with "(HTTP response code 503)" under it. The Wordfence security plugin sent it, because it has blocked or slowed down your visit.
- A designed page that says the site is under maintenance or coming soon. A maintenance-mode plugin is switched on.
- A plain page. Apache's says "The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later." The one built into nginx says "503 Service Temporarily Unavailable". The web server sent it, not WordPress.
- A page that names Cloudflare. Cloudflare's documentation says a 503 with "cloudflare" in the page's HTML was generated by Cloudflare, and one without it by your own server.
- "Error establishing a database connection". WordPress sends that message with a 500. A site can replace the message with a file of its own,
db-error.phpinwp-content, and then that file sets the status. Either way, follow how to fix the database connection error.
Step 2: Ask for the page from a command line
Run this in a terminal on your own computer, with your own address in place of
example.com. It prints the status line and the headers the server sent, and leaves out the page itself.Without a terminal, the HTTP status and redirect checker shows the status code an address answers.
bashcurl -s -o /dev/null -D - https://example.com/Step 3: Look for a Retry-After line
Retry-Aftersays how long the service is expected to be unavailable, as a number of seconds or as a date. WordPress sendsRetry-After: 600with its maintenance message. A server is not required to send the header, so its absence tells you nothing.textHTTP/1.1 503 Service Unavailable Retry-After: 600Step 4: Open the login page
Go to
https://example.com/wp-login.php, with your own domain. If it loads while the public pages answer 503, the server is working and something on the site itself, such as a plugin, is turning visitors away: go to the next fix.
If you have WP-CLI, this says whether WordPress itself is in maintenance mode:
wp maintenance-mode statusSwitch off the plugin that is answering 503
- Takes care
- Low risk
- About 15 minutes
- Steps tested on WordPress 7.1.3
A maintenance-mode plugin answers visitors with its own page for as long as its mode is on. The listing of the Maintenance plugin, for one, describes a "503 Service temporarily unavailable" option, and says that a logged-in WordPress user sees the website in normal mode. That is how an owner can miss it.
If you can log in, switch the plugin's maintenance mode off in its settings. If you cannot, switch plugins off from outside.
Step 1: List the active plugins and keep the list
--skip-pluginsand--skip-themesstop WP-CLI from loading the plugins and the theme while it runs.bashwp plugin list --status=active --field=name --skip-plugins --skip-themesStep 2: Switch them all off
bashwp plugin deactivate --all --skip-plugins --skip-themesStep 3: Reload the site
If it loads, a plugin was sending the 503.
Step 4: Activate the plugins one at a time
Use each name from your list in place of
plugin-folder-name, and reload the site after each one.When the 503 comes back, the plugin you activated last is the one sending it. Deactivate it again, then log in and turn its maintenance mode off before you activate it.
bashwp plugin activate plugin-folder-name
Without WP-CLI, renaming a plugin's folder switches it off. How to deactivate WordPress plugins when you are locked out has that way and one through the database, step by step. The same applies if Wordfence on your own site has blocked you.
To undo it: Activate the plugins again on the Plugins screen, one at a time.
Ask the host whether a limit was reached
- Easy
- No risk
- About 20 minutes
A plain 503 from the web server, or one that comes and goes, is a question for the host first.
Step 1: Check the host's status page and your inbox
A host may send all traffic to a 503 page while it works on a server. Its status page, or a notice it emailed, says whether that is happening now.
Step 2: Look at the account's resource usage
CloudLinux documents what a visitor sees at each of an account's limits:
- Memory, or the number of processes: 500 or 503 errors.
- CPU, or disk reads and writes: the site answers more slowly.
- Concurrent connections: a 508 page that says "Resource Limit Reached".
On hosts that run it, the control panel has a page that CloudLinux's documentation calls "CPU and concurrent connection usage". Its dashboard shows whether the site has been limited, and its charts mark each time a limit was reached.
Step 3: Write to the host with the facts
Give the exact time with your time zone, the address that failed and the exact words on the page. Ask whether there is an incident on your server, and whether the account reached its memory or process limit and at what times. How to tell whether the fault is the host or the site has a message to copy.
Step 4: If a limit was reached, find out why before you pay for a larger plan
Reaching a limit does not prove the plan is too small. WordPress's documentation says the number of plugins and how well they perform have a huge impact on a site's performance, and a plugin that uses too much moves with the site to any plan. How to find and fix a WordPress plugin conflict shows how to test plugins in turn; watch the usage charts as you go. The guide to hosting problems lists the signs that the plan itself is the problem.
Take load off the server
- Takes care
- Low risk
- About 30 minutes
WordPress's documentation says that without caching, performance slows to a halt as page requests come in and stack up, and that abusive traffic such as brute force login attempts adds to the load.
Step 1: Find out what the traffic is
Ask the host which addresses were requested most at the time of the 503, or read the access log if your control panel shows it. Many requests for
wp-login.phporxmlrpc.phpare a program guessing passwords. How to protect WordPress from brute force attacks shows how to cut down how much of that reaches the site.Step 2: Serve saved copies of pages
A caching plugin saves posts and pages as static files and serves those, which reduces the processing the server does for each visitor. Ask the host first whether it already runs a page cache. WordPress caching plugins compared covers the choice.
When to get help
If the page is not WordPress's maintenance message, the 503 stays with every plugin off, and the host reports no incident and no limit reached, the cause is in the server's own logs. On most hosting plans only the host, or someone with access to the server, can read them.
Common questions
Will a 503 hurt my site in Google?
Not a short one. Google's documentation says server errors make its crawlers slow down, that pages already indexed are kept at first, and that addresses which persistently return a server error are removed from the index. If a site has to be closed urgently for a day or two, its advice is to return an error page with a 503, and never to answer 503 for robots.txt.
Why does the 503 come and go?
A limit that is counted at one moment is being reached and then freed. CloudLinux's documentation says that once an account reaches its limit on processes, no new process can be created until another one ends. Requests that arrive in that moment can get an error, and the next ones get through.
How long should I wait before I do anything?
If the page is WordPress's maintenance message, ten minutes: WordPress treats maintenance as over once its maintenance file is ten minutes old. If the answer has a Retry-After line, wait that long. If the host's status page reports an incident, wait for it to close. Otherwise there is nothing to wait for, so start with the first fix.
- GuideSlow WordPress admin: how to find the cause and fix it
- ResourceWooCommerce checkout is down: a runbook
- GuideWordPress site not showing up on Google: what to check, in order
- Guideadmin-ajax.php high CPU usage in WordPress: how to find what is calling it
- GuideHow to change WordPress permalinks without breaking your old links
- GuideHow to deactivate WordPress plugins when you are locked out of the dashboard

