W3 Total Cache, RackSpace Cloud Files, and Forcing Downloads [closed]

This can be broken down to a simple task by adding a custom filter. You will need to add the following to the _send_request method within the CF_Http class in cloudfiles_http.php line 1283. $headers = $this->_make_headers($hdrs); //Add this line below $headers = apply_filters(‘cloudfiles_headers’, $headers, $url_path, $method); This will give you access to the headers from … Read more

Where should I host my images?

I’m probably overcomplicating things. Right now, you are. As I have no traffic as of now I don’t really need to do this, but …. I don’t know what to choose as I don’t understand what these services really do, other than it’s supposed to be “better” to host externally… Then why bother with a … Read more

COOKIE_DOMAIN setting confusion

As cdn.mydomain.com is not part of your WordPress network, it wont be affected by your settings. The COOKIE_DOMAIN constant should only be used if you want to serve cookies from a single domain for all your sites in the network. If you omit the constant or set it to an empty value, cookies will belong … Read more

How to replace regular jquery calls with CDN calls from Google?

You should be loading jQuery with wp_enqueue_script(‘jquery’) – that way, you won’t end up with multiple instances if plugins try to load it too. To use Google CDN, place this in your functions.php; wp_deregister_script( ‘jquery’ ); wp_register_script( ‘jquery’, ‘https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js’, null, // Dependencies – none null // Version – use null to prevent WP adding version … Read more

Configuring WordPress for Amazon CloudFront Caching?

The plugin works fine; alternative you can use a own function to replace the bloginf() to your CDN-Url; Example: replace the url in content: // replace content for CDN if ( !function_exists(‘fb_add_static_content_url’) ) { function fb_add_static_content_url($content) { if ( is_admin() ) // eigentlich überflüssig return $content; $wpurl = get_bloginfo(‘wpurl’); $search = array( $wpurl . ‘/wp-content/images/’, … Read more

How does W3 Total Cache CDN URL rewrites work? [closed]

The W3 Total Cache plugin changes the URL of various files in /w3-total-cache/lib/W3/Plugin/Cdn.php in the function *ob_callback*. It uses a series of callbacks to modify an output buffer. The code runs like this: w3_total_cache.php calls $root->run(); W3_Root::run calls $plugin->run() for each plugin in $this->_loaded_plugins W3_Plugin_TotalCache::run starts an output buffer which calls W3_Plugin_TotalCache::ob_callback W3_Plugin_TotalCache::ob_callback calls w3tc_do_ob_callbacks() … Read more

Is it too late to use a CDN? [closed]

Most CDNs (including Amazon’s Cloudfront, which is what I’ve used), allow origin pull, which essentially means that the CDN pulls the required entity from, in this case, your blog, the first time someone tries to access it. If use a caching plugin like wp-supercache, or w3 total cache, they integrate with CDNs like Cloudfront to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)