Marks and Spencer has reported a big drop in online sales after its move to a new website platform hit trading. Sales at the website were down 8.1% in the 13 weeks to 28 June, with M&S chief executive Marc Bolland admitting the new site had “an impact on sales”. BBC Google recently did some […]
Tuning
Switch off comments on attachments
(Thanks to WP Beginner) Add to your functions.php function filter_media_comment_status( $open, $post_id ) { $post = get_post( $post_id ); if( $post->post_type == ‘attachment’ ) { return false; } return $open; } add_filter( ‘comments_open’, ‘filter_media_comment_status’, 10 , 2 );
Enable caching of static resources
Add to .htaccess ExpiresActive On ExpiresByType image/gif “modification plus 6 month” ExpiresByType image/jpeg “modification plus 6 month” ExpiresByType image/png “modification plus 6 month” ExpiresByType application/javascript “modification plus 1 month” ExpiresByType text/css “modification plus 1 month”
Increase WordPress memory limit
Add to wp-config.php /** * Increase WordPress Memory Limit. */ define(‘WP_MEMORY_LIMIT’, ’64M’);
Remove query strings from static resources.
Query strings attached by WordPress to the urls of javascript and css files impact on the Page Speed score. Thanks to Tricks Machine for this snippet: Add to your functions.php function _remove_script_version( $src ){ $parts = explode( ‘?ver’, $src ); return $parts[0]; } add_filter( ‘script_loader_src’, ‘_remove_script_version’, 15, 1 ); add_filter( ‘style_loader_src’, ‘_remove_script_version’, 15, 1 );