Dont cache 5xx Responses | WordPress.org

[ad_1]

Plugin Contributor
iSaumya

(@isaumya)

Hi @partakaw,
I just checked this and could not replicate this issue. Here’s what I’ve done:

In the root of the website (where wp-config.php file is present) I’ve added a file named .maintenance and inside that file added this code:

    <?php
        $upgrading = time();
    ?>

    This helps the website to show the WordPress Maintenance mode. But in this mode, I do not see any Cache-Control in the response header and also the Cloudflare cache status is DYNAMIC which means the page is not being cached. Screenshot:

    So, I would suggest you to share your maintenance page URL so that I can look into it.

Hello and thank you for the quick reply, i am using

Its a network site install, so i dont use the .maintenance method

Plugin Contributor
iSaumya

(@isaumya)

Hi @partakaw,
I cannot comment on other third-party plugins. They need to add Cache-Control: no-store, no-cache, must-revalidate, max-age=0 for the requests. I’ve tested the WP Native maintenance mode and did not find any issues there.

OR

You can disable the page cache from the plugin settings when you enable maintenance mode. There is no point of keeping page caching active when you have enabled maintenance mode anyways.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer