0

I enabled maintenance mode on a Drupal 7 site; however, when I checked the homepage as an anonymous user, I noticed that the original homepage was still being displayed rather than the maintenance page. It was only after clearing the site's caches that the maintenance page was displayed. Anonymous page caching is enabled on the site.

I am wondering if it is necessary to clear the site cache's for maintenance mode be be effective or is it sufficient to just enable maintenance mode in the admin UI? My main objective to be able to safely run database updates, which should be run whilst the site is in maintenance mode. The actual display of the maintenance page is not really important.

  • If the content of the page is not a problem with you, then it is safe to not clear the cache. On the contrary, the cached page is still served even while you are in maintenance mode, so this is a good thing. Only when users try to access pages they are not allowed to due to maintenance mode, will they see any kind of message. – Jaypan Nov 21 '18 at 10:47
0

As you stated that 'The actual display of the maintenance page is not really important' hence it is not necessary to clear the site caches in this case.

But it is best practice to do so, because if any user interactions like forms are there, user will be getting error messages!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.