Optimizing Pagespeed Beyond Images and Plugins

Take Your Site Optimization to the Next Level

Plugins can only take you so far

Pagespeed is a topic we’ve covered frequently in the past – because it’s important! Numerous studies have shown that if a site takes too long to load, in many cases more than a few seconds, then users will leave and never see all that content you put hard work into. Not only that, but those people who leave will contribute to a higher bounce rate, which search engines like Google take notice of when ranking your site. A slow site not only hurts you in the immediate loss of a potential visitor, but in the longterm of a negative hit on your site in Google’s eyes.

A great first step is to optimize large images. Having big, enticing assets is a popular trend in web design right now, but nobody will see them if they slow your site to a crawl! We’ve covered this topic in a blog post before, and this is a great first step to creating a snappy site. Just recently we added on with WP Rocket’s configuration options to optimize your site. This goes beyond the visual assets, and improves your site at the core level.

But images and plugins can only take you so far. What do you do if you have every optimization running, but you’re still not reaching a comfortable loading time? Maybe you have a huge page with many assets called, or a lot of different plugins to boost your site with extra functionality. Thankfully, there are some options you can utilize to shave off those final crucial seconds.

Inline CSS and JavaScript

Even with something WP Rocket’s file minification and combination, some files can be excluded for a multitude of reasons. But you can print out the styles and scripts that are being used (for admins only on production sites) using WordPress functions, and then deregister and inline those scripts. In essence: 1) print out the list of all scripts and styles that are being called, 2) deregister the dequeue any scripts that don’t need to be served separately, and 3) copy the contents into an inlined script or style tag down in the footer.

In essence, this prevents multiple calls to different assets, which can slow down your site drastically with a decent number of plugins. Instead of calling for numerous different files from different locations on the server, all the contents of those files are injected right into the footer for immediate availability. You can even go further than that, and only insert certain scripts and styles on the pages that they’re necessary to reduce even more code that needs to be read on other pages.

GZIP Compression

Gzip compression can be used to reduce the size of files, making them quicker to call and load. In essence, Gzip compresses files on the server side before sending them to the browser, making the transition quicker. The user’s browser then unzips the files, which is a quick process, and reads the contents to apply them. You can use Gzip compression on almost all files on your website. You can enable Gzip on your website by adding some lines of the code, or via a utility called gzip.

Optimize Google Fonts

It may sound a bit strange for a company focused on user experience and optimizing websites, but Google Fonts are notorious for slowing down load times. Font files are inherently fairly large, especially when there are different styles (bold and italic, and the combination of both) and font weights (it can be possible to have a full range from 100 to 900). Not only are these files large, but they’re hosted on Google’s API server, which hundreds of thousands of sites call to in order to pull their Google fonts. Even using just one Google Font can have a surprising impact on your site’s speed.

The best option here is to host these fonts on your own server. Simply download the font files from Google’s site, drop them on your own website server, and call for these files instead of calling to Google’s servers. That’s the main benefit: you only have to make an internal call for the fonts to render them, drastically saving loading times. But not only that, you can also reduce the size of these files. If you only use two or three of the font weights, you can remove the unnecessary weights from being called at all. This will make the actual data that needs to be read smaller, reducing loading time as well.

Upgrade Your Hosting

At the end of the day, where your website is hosted does matter. The plan you purchase dictates how much bandwidth you have available to transfer data, and also whether or not you’re on a shared environment. If you surpass your bandwidth allocation (usually allocated on a monthly basis), or even if another site on your shared server is having a big sale with lots of traffic, your own site’s loading times will slow down. Shared server environments are great for saving money, but come with loading time risks and even some potential security risks if a bad actor gets access to another site in the shared environment.

In short, if you’re reaching the end of this list and still having trouble making your site speedy, then it may be worth looking at a hosting upgrade. You can usually upgrade your allocated bandwidth on a shared environment, or even move away from a shared environment altogether. This is possible through dedicated servers, yes, but also through VPS, or virtual private servers that section off a part of a server exclusively for you, instead of sharing the space with other sites.

Not sure where to upgrade your hosting? You may want to consider Mr. WPress Managed Hosting. Not only do you get all the benefits of big name providers like SSL and automatic backups, but you also get your own VPS and a professional developer actively maintaining your website. Learn more on our Managed Hosting page!