How to put WordPress into maintenance mode using a code snippet?


There are time when you need to put WordPress into maintenance mode, but don't want to install a full plugin. For example, when you are migrating a website from one host to another, you may want to leave the old site in maintenance mode whilst waiting for the DNS to update.

To do this, just add the following snippet to bottom of the functions.php file of the site

 


Was this answer helpful?

One email a month. Endless business benefits.

Don't miss out on WMTWWFY — the newsletter that keeps your website fast, safe, and visible.

« Back
Spinner
aluminium-anthropoid Security Check