Speed up WordPress

I was in a similar situation recently and started using W3 Total Cache too. I’m not sure what settings you have at the moment, but it’s worth experimenting a bit if you can to see that you’re really using W3 Total Cache to the max For example, I originally only had Page Cache and Browser … Read more

Change WordPress’ media upload URL?

It was actually easier than I thought. function route_uploads_past_cdn( $url, $path ) { $upload_paths = array( ‘async-upload.php’, ‘media-new.php’ ); if( !in_array( $path, $upload_paths ) ) { return $url; } return str_replace(‘www.’, ”, $url); } add_filter( ‘admin_url’, ‘pew_route_uploads_past_cdn’, 10, 2 ); The URL for uploading media would normally be http://www.example.com/wp-admin/media-new.php would now be http://example.com/wp-admin/media-new.php since the … Read more

Change Image URL to a CDN

Since the major adoption of Responsive Images and the addition of new srcset attribute to the <img> element. WordPress has to evolve too. WordPress 4.4 added the responsive images feature. If you inspect the src attribute it might point to the CDN, however, you still need to consider the srcset attribute which might still be … Read more

Deregister WordPress jquery on specific page

Hook to wp_enqueue_scripts. It will do the trick. Modified code is- if (!function_exists(‘modify_jquery’)) { function modify_jquery() { if (is_page(array(‘page 1’, ‘page 2’))) { wp_dequeue_script(‘jquery’); wp_deregister_script(‘jquery’); wp_register_script(‘jquery-custom’, ‘//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js’, false, ‘1.11.3’, ‘true’); wp_enqueue_script(‘jquery-custom’); } } } // add_action(‘init’, ‘modify_jquery’); add_action(‘wp_enqueue_scripts’, ‘modify_jquery’); Hope this is gonna help.

Best image hosting service

Its not recommended often enough, but Flickr is an excellent image host for blogs as well. Their pro account costs only $25/year. You get unlimited image, video uploads and no bandwidth limit. If you don’t want your blog image uploads populating your personal photostream, you can easily create a separate account for it. You can … Read more

Host wp-content on other domain, much like a CDN

In WordPress Dashboard > Settings > Media and fill the field “Full URL path to files” with your other domain. See the screenshot below: EDIT: I thought it would be obvious, but it isn’t. Here’s what you exactly need to do: You should map your domain to point to: public_html directory, IF it’s also your … Read more

WP script versioning breaks cross-site caching?

Use null as $ver param: wp_deregister_script( ‘jquery’ ); wp_register_script( ‘jquery’, ‘https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js’, false, null); wp_enqueue_script(‘jquery’); Output: <script type=”text/javascript” src=”https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js”></script>

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