WordPress disable object cache
- This topic is empty.
-
AuthorPosts
-
April 12, 2023 at 8:42 am #4955PatriciaGuest
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 plugins
April 12, 2023 at 8:46 am #4956LarryGuestThe easiest way to disable object cache in WordPress is simply deleting the
object-cache.php
file 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!
April 12, 2023 at 8:49 am #4957JohnGuestIf you are using SlickStack you can
sudo nano /var/www/ss-config
and then look for this line in your config:SS_OBJECT_CACHE="true"
Then simply change the value of this variable to
false
After that, run
ss install mu plugins
and it will reinstall the MU plugins for your WordPress site (and also the object cache) and after it finishes running, it will delete yourobject-cache.php
file if you have that setting disabled.April 12, 2023 at 8:49 am #4958NicholasGuestSo there is no setting in WordPress WP Admin for this?
April 12, 2023 at 8:50 am #4959KarenGuestSo there is no setting in WordPress WP Admin for this?
Correct.
Because
object-cache.php
is a “drop-in” plugin, that means you simply add the file or delete the file, no database/settings for better stability.April 12, 2023 at 8:52 am #4960LawrenceGuestSome more info about drop-in plugins:
https://wordpress.stackexchange.com/questions/135416/are-drop-ins-harmful-for-wordpress-website
April 12, 2023 at 8:58 am #4961EdwardGuestokay 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?
https://wordpress.org/support/topic/suggestion-disable-object-cache-from-wp-config/
this is not universal, correct
April 12, 2023 at 9:02 am #4962AdamGuestCorrect 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)
https://github.com/littlebizzy/object-cache
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.
April 12, 2023 at 9:03 am #4963CharlotteGuestTLDR 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
ss-config
settings 🙂May 2, 2023 at 9:33 am #5194BrendaGuestis this method no longer supported in WP?
wp_suspend_cache_addition( true );
May 13, 2023 at 9:35 am #5329JeanGuest@Brenda
I have never heard of
wp_suspend_cache_addition
before… 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 WordPressJune 8, 2023 at 6:44 pm #5989JuanGuestStep 1.
Delete your object-cache.php
Step 2.
Relax, you’re done!
July 17, 2023 at 7:40 pm #6674EmilyGuest -
AuthorPosts
- You must be logged in to reply to this topic.