Make WordPress Core

Opened 2 months ago

Closed 2 months ago

#61247 closed feature request (wontfix)

"You should use a persistent object cache" - Allow disable warning

Reported by: olihar's profile olihar Owned by:
Milestone: Priority: normal
Severity: minor Version: 6.5.3
Component: Site Health Keywords:
Focuses: Cc:


Not everyone needs or wants to use cache, it can in many cases be way worse.

Can you please allow us to disable this warning. I know its possible to do so but it will come back after each update, I would like this setting to be permanent. Using WordPress for others will have none stop questions about why they get this error.

Change History (3)

#1 @MattyRob
2 months ago

With a little code, this is already possible. Put the following into a site specific custom plugin.

add_filter( 'site_status_tests', 'remove_persistent_object_cache_test' );

public function remove_persistent_object_cache_test( $tests ) {
        unset( $tests['direct']['persistent_object_cache'] );
        return $tests;

#2 @jamieblomerus
2 months ago

  • Component changed from General to Site Health
  • Severity changed from normal to minor

I will change this to Site Health because that is where this kind of warning shows up.

I don't see the point in letting people disable certain warnings from the UI as it is easier just to ignore them. They are after all only recommendations.

The only time I believe this would be beneficial is if a Web Agency builds a website for a client and knows it would be redundant to add object cache to it but worries the client will think something is wrong with their website since there are recommended improvements. In that case it would be easy to disable that recommendations by returning false on the filter site_status_should_suggest_persistent_object_cache.

#3 @johnbillion
2 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Thanks for the report @olihar . I will say that if you run a site that performs worse with an object cache in place then your time would be better spent investigating that instead of worrying about hiding the recommendation to install an object cache. In the long run it'll be better for everyone involved.

I'll close this ticket off because the site_status_tests filter is available for when you really want to disable certain Site Health checks.

Good luck!

Note: See TracTickets for help on using tickets.