Remove query strings from static resources. 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 ); Increase WordPress memory limit Add to wp-config.php /** * Increase WordPress Memory Limit. */ define(‘WP_MEMORY_LIMIT’, ’64M’); Enable caching of static […]
Blog
E-Commerce Performance
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 […]
Minify Html
Found at Forrst. Add to functions.php. A way to minify HTML without adding another plugin. <?php /* Minifies HTML */ /* (source: http://www.intert3chmedia.net/2011/12/minify-html-javascript-css-without.html) */ class WP_HTML_Compression { // Settings protected $compress_css = true; protected $compress_js = false; protected $info_comment = true; protected $remove_comments = true; // Variables protected […]
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’);