Reputation:
I am creating a website, but I needed to do refresh several time to see the changes I made in website. Is there any option that I can use to disable cache in WordPress?
Upvotes: 24
Views: 81366
Reputation: 323
add code in your wp-config.php file.
//Add This Code In wp-config.php File To Enable Cache With Expiration
define('WP_CACHE', true); // enable the cache
define('ENABLE_CACHE', true); // enable the cache
define('CACHE_EXPIRATION_TIME', 3600); // in seconds
//Add This Code In wp-config.php File To Disable Cache
define('WP_CACHE', false); // disable the cache
define('DISABLE_CACHE', true); // disable the cache
Upvotes: 1
Reputation: 7138
If you want more fine-grained control over what pages should not be cached, which ones should and for how long, etc. or you don't want to change the wp-config.php
file, you can also try out the W3 Total Cache plugin. I have used it for quite a while now and can recommend it.
Upvotes: 0
Reputation: 137
Use Disable cache in google chrome developer options. Press F12, Go to Network > check disable cache.
Upvotes: -1
Reputation: 3504
put below code in your wp-config.php file.
define('WP_CACHE', false);
Upvotes: 42