Guide

How to put WordPress in maintenance mode without plugin

Understand the.maintenance file used by WordPress during some updates.

⌚ About 2 min read
View my favorites
WordPress Intermediate. 5 min

Understand the.maintenance file used by WordPress during some updates.

Avant de commencer : adaptez toujours les commandes et manipulations à votre environnement. Sur un système de production, prévoyez une backup ou un retour arrière lorsque l’action peut modifier la configuration.

Étapes à suivre

  1. 1

    Save Site

    Save before manual modification.

  2. 2

    Access the WordPress root

    Use FTP/SFTP or host file manager.

  3. 3

    Create.maintenance file with caution

    WordPress uses this file to temporarily display a maintenance message.

  4. 4

    Delete file after intervention

    Do not leave the site blocked in maintenance.

  5. 5

    Control the public site and the administration

    Check both interfaces.

À retenir

  • For a custom maintenance page, a dedicated solution may be preferable.
  • If WordPress remains blocked after an update, look for a.maintenance file that remains present.
Technical deep dive

WordPress: deepen diagnosis without hiding the root cause

Technical checkpoints

  • WP_DEBUG_LOG usually writes to wp-content/debug.log only when WP_DEBUG is enabled and the PHP process can write the file.
  • Renaming a plugin directory prevents it from loading without changing the database, which is useful when wp-admin is unavailable.
  • WP_MEMORY_LIMIT cannot exceed the memory actually granted by PHP/hosting; memory errors require reading memory_limit and peak usage.

Controlled recovery

Isolate the failing plugin or layer, keep logs, then re-enable one component at a time.

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Topic-specific pitfalls

  • Deleting .maintenance, a plugin or cache without recording initial state can make the symptom disappear without explaining the cause.
  • A redirect loop can come from WordPress, proxy/CDN, HTTPS or a plugin: check each layer separately.

How to validate

  • The site loads with clean logs and the failing component is identified, not merely disabled.
  • Temporary debug constants are removed or adjusted after the intervention.
♡ 0