Pros and Cons for high “expire time” on wp-super-cache or w3-total-cache? [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange. Closed 7 years ago. Improve this question In the wp-super-cache page, there is the following sentence, which I do not understand:: Checking for and deleting expired files is … Read more

Is it possible to completely stop WP_Query retrieving posts?

I’m trying to use WP Redis to cache entire $wp_query object with key is $query_vars_hash. This is how $wp_query was added to $wp_object_cache: add_action(‘wp’, function($wp) { if ( is_admin() ) return; global $wp_query; if ( !wp_cache_get($wp_query->query_vars_hash, ‘globals’) ) { wp_cache_add($wp_query->query_vars_hash, $wp_query, ‘globals’); } }); Then, I need to check if a query has already cached … Read more

After Moving a Site to Another Domain, All Images Are Lost

I moved from www.domain1.com to www.domain2.com However, the image paths are still pointing at www.domain1.com/wp-content/uploads…. So when www.domain1.com went down, all my images are not showing anymore. I updated the wp_posts table where all attachments now point to www.domain2.com/wp-content/uploads…, but the images exist in www.domain2.com and I still cannot see any image. Is my caching … Read more

Is get_option() faster than accessing get_transient()?

Today I run a test over my db to explore the speed difference between accessing a key from options, custom table & transients. I ran the test for 1000 times and following is the time taken to run 1000 get operations: get_transient() 0.0245 seconds get_option() 0.0068 seconds simple select operation from Custom Table 0.65 seconds … Read more

Prevent WordPress from sending Cache-control http header

My site sits on a server that uses Varnish as a (powerful) caching engine. Unfortunately, it seems wordpress is busting the Varnish cache by sending a cache-control http header. If I curl -I domain.com I get: HTTP/1.1 200 OK Server: Apache/2.4.10 X-Powered-By: PHP/5.4.4-14+deb7u14 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, … Read more

Getting failure when using filemtime() with wp_enqueue_style

I am trying to change the stylesheet file version using the filemtime() function with the wp_enqueue_style with the following snippet function pro_styles() { wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri() .’/child-style.css’, array(), filemtime(get_stylesheet_directory_uri() .’/child-style.css’), ‘all’ ); } add_action( ‘wp_enqueue_scripts’, ‘pro_styles’ ); but it is throwing a warning Warning: filemtime(): stat failed for….. While i am sure that the file … Read more

Forcing reload of editor-style.css

Is there a method to force the refresh of editor-style.css, when I change manually the stylesheet for the TinyMCE editor? Modification doesn’t show immediately but they will be cached in the admin side of administration backend. For example like this: editor-style.css?ver=3393201 5 There is a hook for that: ‘mce_css’. It is called in _WP_Editors::editor_settings() and … Read more