WordPress disable object cache
- This topic is empty.
how can I deactivate the object caching in my WordPress site because I want to test if that is causing some problem with one of my pluginsLarryGuest
The easiest way to disable object cache in WordPress is simply deleting the
object-cache.phpfile that (might) exist in your /wp-content/ directory.
That assumes the file exists, but it might not.
Object caching is something that differs greatly between different web hosting companies and platforms, so they might have a control panel for you to use whenever you want to enable or disable object cache.
Some general “cache” plugins for WordPress also have object cache settings!JohnGuest
If you are using SlickStack you can
sudo nano /var/www/ss-configand then look for this line in your config:
Then simply change the value of this variable to
After that, run
ss install mu pluginsand it will reinstall the MU plugins for your WordPress site (and also the object cache) and after it finishes running, it will delete your
object-cache.phpfile if you have that setting disabled.NicholasGuest
So there is no setting in WordPress WP Admin for this?KarenGuest
So there is no setting in WordPress WP Admin for this?
object-cache.phpis a “drop-in” plugin, that means you simply add the file or delete the file, no database/settings for better stability.LawrenceGuest
Some more info about drop-in plugins:
okay I saw a WP thread about maybe users can disable object cache from the wp-config.php settings but maybe that is for only their specific plugin?
this is not universal, correctAdamGuest
Correct its not universal, looks like that thread was making a suggestion for the LS Cache plugin, but seems it was not implemented maybe.
LittleBizzy had an option for their forked version of Pressjitsu object-cache.php which was called:
define('OBJECT_CACHE', true); // default = true (if not defined, object-cache.php loads by default)
But that is not typical, most object cache scripts do not support disabling even with special settings in wp-config.php. And really, they probably shouldn’t because then something could perhaps interfere with your hosting environment.
SlickStack doesn’t use this script anymore in fact.CharlotteGuest
TLDR disabling object cache depends on your web hosting platform in most cases, so you might need to contact them about how to proceed.
But for SlickStack you disable it with your
is this method no longer supported in WP?
wp_suspend_cache_addition( true );JeanGuest
I have never heard of
wp_suspend_cache_additionbefore… that blog post is like 10 years old already, not sure but I suspect that method is not accurate anymore for more modern versions of WordPress