3 Quick Ways to Speed Up WordPress and Boost Your Page Speed Score

Written by Justin on September 8, 2019 , ,

If you use WordPress, you might have noticed a seemingly endless supply of plugins claiming to speed up your WordPress site and boost your page speed score. And, for those of you who've tested them against measuring tools like Pingdom or GTMetrix, you might agree with us if we said most caching plugins don't live up to their expectations. That being said, there are some effective ways to speed up your WordPress site without investing too much time and effort. In this article we cover 3 quick ways to speed up WordPress and boost your page speed score without going into premium plugins or CDN services.

How to Speed up Your WordPress Site and Boost Your Page Speed Score Quickly and Effectively:

  • Optimize your photos, graphics, and other images for the web by resizing & compressing them without impacting quality
  • Configure browser caching so that your visitors won't need to re-download everything unless you update your website
  • Remove query strings from static resources so web browsers can cache as much as possible between re-downloads

1. Optimize Your Photos, Graphics, and Other Images from within WordPress

Optimizing all your images is a strong first step in order to speed up WordPress. Install an image optimization plugin like TinyPNG, EWWW Image Optimizer, or reSmush.it to begin without too much setup. These usually work the same way by removing redundant color data, a process known as quantization, and clearing the metadata from your photos, graphics, icons, etc. This technique in general does not create any noticeable degradation of image quality. Though the default settings are good enough for most, you might be able to shave off a few more kilobytes by tweaking compression settings.

Remember to use your best judgement when it comes to image optimization suggestions. As an example, even Google's Page Speed Insights tool isn't gospel and will sometimes make impractical recommendations (as with all page speed testing tools).

2. Configure Browser Caching on Your Host

Next, let's configure browser caching on your host. Please note we recommend this step only if you're not using a caching plugin in order to avoid potential conflicts. If your web host provides cPanel or a server powered by Apache, simply insert this snippet inside the <IfModule mod_expires.c> block in either your webroot .htaccess file or server's apache .conf file:

ExpiresActive On
ExpiresByType image/jpg "access 1 week"
ExpiresByType image/jpeg "access 1 week"
ExpiresByType image/gif "access 1 week"
ExpiresByType image/png "access 1 week"
ExpiresByType text/css "access 1 week"
ExpiresByType application/pdf "access 1 week"
ExpiresByType text/x-javascript "access 1 week"
ExpiresByType application/x-shockwave-flash "access 1 week"
ExpiresByType image/x-icon "access 1 week"
ExpiresDefault "access 1 week"

Alternatively, if your host is powered by NginX or sports a dual server configuration (e.g. Plesk Panel), you should not use the above code. Instead, reach out to your host to add this snippet to the server's nginx .conf file (not .htaccess).

location ~* \.(js|css|png|jpg|jpeg|gif|ico|mp4|webm)$ {
expires 7d;
add_header Cache-Control "public, no-transform";
gzip on;
gzip_proxied any;
gzip_min_length 1100;
gzip_comp_level 1;
gzip_types application/x-javascript application/javascript text/javascript text/css text/plain text/xml application/xml image/gif image/jpeg image/png image/x-icon image/bmp image/svg+xml application/x-httpd-php video/mp4 video/webm;
gzip_vary on;

Notice how we recommend setting the cache validity period for 7 days or 1 week. We find this duration strikes a good balance between browser caching and fresh downloads from your host and is also the minimum accepted duration in most page speed scoring tools.

If you're not sure where to put the code or don't feel comfortable modifying .htaccess, reach out to your host for some support. It is always best to err on the side of caution when modifying .htaccess or .conf files.

3. Remove Query Strings from Static Resources

This step is optional but strongly recommended in order to fully unlock the benefits of configuring browser caching. Removing query strings from static resources ensures web browsers can cache everything on your site they need to. Without this step, any improvements to your page speed score from step #2 might be limited. Simply paste this PHP snippet into the functions.php file of your child theme or into a snippets plugin.

function _remove_query_string( $src ){
$parts = explode( '?ver', $src );
return $parts[0];
add_filter( 'script_loader_src', '_remove_query_string', 15, 1 );
add_filter( 'style_loader_src', '_remove_query_string', 15, 1 );

Please note you can also paste the above snippet into the functions.php file of your theme and have success, though this isn't recommended. If you don't have a child theme and don't want to use a snippets plugin, here's a great child theme generator plugin to get you squared away.

So there you have it. If you invest 15-20 minutes to implement one or more of these steps, your WordPress site will be in much better shape. If you have questions or want to switch hosts, please reach out to Cyberia Technologies and we'll do our best to help.

Schedule a Free Call.

Deploying a successful digital strategy requires you to dive deep into the “why” behind your company. Make the decision to thrive with Cyberia Technologies. Reach out for an Online Health Audit today.
Privacy PolicyTerms & Conditions
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram