Optimizing a WordPress Website for Google Page Speed Insights

A running compilation of potential fixes for issues that arise from running Google’s Page Speed Insights tool.

Eliminate render-blocking JavaScript and CSS in above-the-fold content

You can add this to your functions.php file to move scripts into the footer.

function md_footer_enqueue_scripts() {
remove_action(‘wp_head’, ‘wp_print_scripts’);
remove_action(‘wp_head’, ‘wp_print_head_scripts’, 9);
remove_action(‘wp_head’, ‘wp_enqueue_scripts’, 1);
add_action(‘wp_enqueue_scripts’, ‘md_footer_enqueue_scripts’);