Free auditStart free
GuideError · HTTP status codes

503 Service Unavailable in WordPress

A WordPress 503 is either core maintenance mode (a .maintenance file, 10 minute expiry) or your host. Check headers, clear a stuck update, and send Retry-After.

5 min
read
7
sources
Oct 29, 2026
updated
Scaplet Editorial Team
author
The short answer

WordPress returns a 503 itself in one case: maintenance mode, triggered by a .maintenance file in the site root that WordPress ignores once it is 10 minutes old. The default page says "Briefly unavailable for scheduled maintenance. Check back in a minute." If the site is not in maintenance mode, the 503 is coming from a layer around WordPress, so read that layer's log.

  1. Where a WordPress 503 comes from
  2. Check it in 2 minutes
  3. Clear a stuck maintenance mode
  4. Planned maintenance: send a 503 you control
  5. When it is not maintenance mode
30-second check

Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode
01Telling the sources apart

Where a WordPress 503 comes from

The 503 that WordPress core sends on purpose is maintenance mode. Core checks for a .maintenance file in the WordPress root on each request. The file holds a $upgrading timestamp, and WordPress treats the site as in maintenance mode only if that timestamp is less than 10 minutes old. Updates write the file before they start and delete it when they finish, so a crashed update is the usual way a site gets stuck.
Source

Core maintenance mode, default page

What you see
Plain page titled Maintenance, with the text "Briefly unavailable for scheduled maintenance. Check back in a minute."
How to confirm
A .maintenance file exists in the site root, and the response has Retry-After: 600
Source

Custom maintenance.php drop-in

What you see
Your own page
How to confirm
A wp-content/maintenance.php file exists. Core loads it and ends the request, so it must send its own status code
Source

Host, web server or PHP process

What you see
A host or server error page, often not styled like your theme
How to confirm
No .maintenance file, and the host or server error log shows the cause. See 503 in Apache or 503 in nginx
Request path: which layer can return the 503
browser or crawler
   |
   v
CDN / proxy (optional)    -> 503 if it cannot reach the origin
   |
   v
web server (Apache, nginx) -> 503 if it is overloaded or its backend is down
   |
   v
PHP process (PHP-FPM, etc.) -> 503 if the host throttles or kills it
   |
   v
WordPress core            -> 503 only from maintenance mode
02Fix it on your stack

Check it in 2 minutes

Commands marked as needing your site run against your own domain. The first two use a public test endpoint so you can see what the output looks like before you point them at anything real.
See what a 503 with Retry-After looks like (public test endpoint)
curl -sS -D - -o /dev/null https://httpbin.org/status/503 | head -n 1
# expected: HTTP/2 503

curl -sS -D - -o /dev/null "https://httpbin.org/response-headers?Retry-After=600" | grep -i retry-after
# expected: retry-after: 600
Your own site: status line and Retry-After (needs your domain)
curl -sS -D - -o /dev/null https://your-site.example/ | grep -i -E "^HTTP|^retry-after"
# Core maintenance mode prints a 503 status line and: retry-after: 600
# A 503 without the default Retry-After was not sent by core's default maintenance page
Your own site: is core in maintenance mode? (needs SSH and WP-CLI)
wp maintenance-mode status
# prints: Maintenance mode is active.   (or the inactive message)

wp maintenance-mode is-active; echo $?
# exit code 0 means active, 1 means not active

I ran the first command pair against httpbin.org on 2026-11-01: the first returns HTTP/2 503 and the second returns the retry-after: 600 header. The WP-CLI output follows the examples in the WP-CLI command reference.

03How it works

Clear a stuck maintenance mode

If the page has said "Check back in a minute" for longer than a few minutes, an update died halfway. Because WordPress ignores a .maintenance file older than 10 minutes, a stuck file usually clears on its own. If it does not, remove it yourself.
  1. 01

    Deactivate with WP-CLI

    Run wp maintenance-mode deactivate. The WP-CLI reference documents activate, deactivate, is-active and status.

  2. 02

    Or delete the file

    Connect with SFTP or SSH, open the WordPress root (the folder with wp-config.php) and delete .maintenance. Hidden files may need to be shown in your SFTP client.

  3. 03

    Finish the interrupted update

    Open Dashboard, then Updates, and rerun the update that stopped. An interrupted plugin or theme update can leave that item half-installed, so check it loads.

  4. 04

    Recheck the headers

    Run the curl check above. A 200 means the site is back.

04Your call

Planned maintenance: send a 503 you control

The default page already sends Retry-After: 600. A custom wp-content/maintenance.php replaces that page, and core then requires the file and calls die(). Nothing in the source sends a status code for you on that path, so your file has to do it, otherwise visitors and crawlers can get a 200 for your maintenance page.
If this fits

Use the default page when

  • The downtime is an update that takes minutes
  • You are happy with the plain core message
  • The 600 second Retry-After is a fair estimate
Or

Write maintenance.php when

  • You want a branded page with contact details
  • You want your own wording for a planned window
  • You need a different Retry-After than 600 seconds
wp-content/maintenance.php
<?php
http_response_code( 503 );
header( 'Retry-After: 3600' );
header( 'Content-Type: text/html; charset=utf-8' );
?>
<!doctype html>
<title>Back soon</title>
<h1>Scheduled maintenance</h1>
<p>We are updating the site. Please check back in an hour.</p>

I ran this file through php -l (no syntax errors) and served it with PHP's built-in server: the response was HTTP/1.1 503 Service Unavailable with Retry-After: 3600. On a real site the drop-in only runs while .maintenance is fresh, so test by running wp maintenance-mode activate, checking the headers, then running wp maintenance-mode deactivate. For a full runbook, see WordPress maintenance mode.

05Next checks, by what you find

When it is not maintenance mode

If wp maintenance-mode status says inactive and no .maintenance file exists, WordPress is not the layer returning the 503. Check the server first, because a 503 from a host often means a limit was hit before WordPress could run. WordPress's debugging guide documents WP_DEBUG_LOG, which writes PHP errors to wp-content/debug.log, and that log only helps if the request reached PHP.
Finding

debug.log shows a fatal error naming a plugin or theme

Next step
Deactivate it: wp plugin deactivate <plugin>, or deactivate everything with wp plugin deactivate --all and re-enable one at a time
Finding

debug.log shows Allowed memory size of ... bytes exhausted

Next step
Raise WP_MEMORY_LIMIT in wp-config.php, for example define( 'WP_MEMORY_LIMIT', '96M' );. The WordPress docs say the default attempt is 40MB for a single site
Finding

debug.log is empty or missing for the failing request

Next step
The request never reached WordPress. Read the web server and PHP-FPM logs, then ask your host about resource limits
Finding

The error page is not from your site at all

Next step
A CDN or proxy returned it. Test the origin directly, or see 503 in Apache
wp-config.php: log errors without showing them to visitors
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
06Good to know

What a WordPress 503 does to SEO

Google treats 500, 503 and 429 as signals to slow crawling, and a 503 or 429 can carry a Retry-After header. Google's guidance for emergencies is that this is fine for a couple of hours up to 1-2 days. Its warning is that if Googlebot sees these status codes on the same URL for multiple days, the URL may be dropped from the index. So a normal update window is harmless, and a site stuck in maintenance for days is not. See 5xx server errors for how to find affected URLs.
Sources · 7

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • wordpress.org
  • google.com
  1. 01WordPress Developer Resources: wp_maintenance()developer.wordpress.org · checked 2026-11-01
  2. 02WordPress Developer Resources: wp_is_maintenance_mode()developer.wordpress.org · checked 2026-11-01
  3. 03WordPress Developer Resources: WP_Upgrader::maintenance_mode()developer.wordpress.org · checked 2026-11-01
  4. 04WP-CLI: wp maintenance-modedeveloper.wordpress.org · checked 2026-11-01
  5. 05WordPress Advanced Administration: Debugging in WordPressdeveloper.wordpress.org · checked 2026-11-01
  6. 06WordPress Advanced Administration: Editing wp-config.phpdeveloper.wordpress.org · checked 2026-11-01
  7. 07Google Search Central: Reduce the Google crawl ratedevelopers.google.com · checked 2026-11-01
Questions

Asked a lot.

3 questions people ask next, answered from the sources on this page.

01How long does WordPress maintenance mode last?

WordPress treats the site as in maintenance mode only while the timestamp in the .maintenance file is less than 10 minutes old. After that, core considers maintenance over and serves the site normally, even if the file is still there.

02How do I get WordPress out of maintenance mode?

Run wp maintenance-mode deactivate if you have WP-CLI, or delete the .maintenance file from the WordPress root with SFTP or SSH. Then rerun the update that was interrupted.

03Does a custom maintenance page send a 503 automatically?

Not in WordPress core's code path. When wp-content/maintenance.php exists, core requires it and ends the request. Your file must set the 503 status and any Retry-After header itself.

Free · 2 minutes

Tools point. Agencies advise. This one ships.

Run the free audit, then approve the fixes. Every change can be undone.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane