My Google Site Reboot for WordPress Performance



Update (08.28.2017) – Adsense AMP Issue Resolved.

My suspicions why Adsense was not displaying in AMP pages was correct. The fix required adding some code to the theme “functions.php” file. For your awareness to achieve the final result I installed the AMP plugin from Automatic, Yoast glue, and updated the functions file. The Yoast plugin allows the inclusion of CSS to get the formatting correct and the AMP plugin creates a quick loading, streamlined, mobile friendly version of the page which is viewable by adding “amp” to the URL.




It’s been about a month since my last post and for those who are wondering, I’ve been busy on another project. I was pinged by Google (most likely a bot) in late June to inform me the site looked good but was lacking in performance which would likely result in fewer visits. What! Included in the ping was a link to test for mobile fitness. Mobile first is a big priority at Google so I ran the test and the results were humbling. My load time was 9ms which would result in an estimated 29% loss of visitors. Again – what!

Separating the Wheat from the Chaff

Checking the Environment

My Google Site(s) reside on a virtual server in a shared environment. This is not the best solution, but a solution I can afford. Working the problem with my hosting provider they graciously agreed to bump my memory all the way to 256M. I thought this would be the solution, but no major improvement. :/

Slimming down WordPress

The next most obvious choice was to deactivate and remove as many plugins as possible. The following are the plugins that survived the cut.

  • Akismet Anti-Spam
    Akismet is an advanced hosted anti-spam service aimed at identifying and moving to the trash those comments used as advertising or worst. It effectively processes and analyzes data from other sites and communities in real time to stay current. A must have for any WordPress site.
  • AMP
    Accelerated Mobile Pages is a Google initiative which is a part of their mobile first strategy. The gist is to strip web content down to the essentials to improve speed. How important is this? Google search places a priority on these pages. A good example is Google News. Pages in the headline are almost without exception “AMP” optimized.
  • Fusion Builder
    This plugin is a requirement of the Avada WordPress theme.
  • Fusion Core
    This plugin is a requirement of the Avada WordPress theme.
  • Yoast SEO
    Yoast is a Search Engine Optimization (SEO) tool. The whole point of blogging is to be discovered and Yoast helps ensure all the pieces are in place.
  • Glue for Yoast SEO & AMP
    In addition to SEO, this plugin adds one very important feature to AMP which is the ability to customize the AMP page via custom CSS.
  • WP Super Cache
    This plugin creates a cache of site content to improve performance. A must have for WordPress.

Enable Performance Perks

Other than bumping hosting performance by adding a more powerful CPU, the choices are few.

WP Cache
Description by Vendor

This plugin generates static html files from your dynamic WordPress blog. After a html file is generated your webserver will serve that file instead of processing the comparatively heavier and more expensive WordPress PHP scripts. The static html files will be served to the vast majority of your users:

  • Users who are not logged in.
  • Users who have not left a comment on your blog.
  • Or users who have not viewed a password protected post.

99% of your visitors will be served static html files. One cached file can be served thousands of times. Other visitors will be served custom cached files tailored to their visit. If they are logged in, or have left comments those details will be displayed and cached for them.

Gzip file compression
Description by Vendor

To achieve fast load times on your WordPress site, decreasing the size of your pages is crucial. This can mean the difference between a site that loads in under 1 second and one that feels like its crawling. Enabling GZIP compression can help reduce the size of your webpage, which can significantly reduce the amount of time to download the resource, reduce data usage for the client, and improve the time to first render of your pages. All modern browsers support it and automatically negotiate GZIP compression for all HTTP requests. Today we are going to share with you how to check and enable GZIP compression on your web server.

AMP
Google Announcement

Smartphones and tablets have revolutionized the way we access information, and today people consume a tremendous amount of news on their phones. Publishers around the world use the mobile web to reach these readers, but the experience can often leave a lot to be desired. Every time a webpage takes too long to load, they lose a reader—and the opportunity to earn revenue through advertising or subscriptions. That’s because advertisers on these websites have a hard time getting consumers to pay attention to their ads when the pages load so slowly that people abandon them entirely.

The Importance of Themes

WordPress offers a rich user experience and is very customizable via the application of themes and plugins. My number one requirement has always been to create a rich mobile experience and to satisfy this requirement I originally selected the Avada theme. To call Avada a theme doesn’t begin to describe its functionality; it’s almost a development environment driven by short codes. Regrettably, all of this flexibility comes at a price in overhead and I assume to get the type of performance I was looking for would require way more hardware than I had available. Another pebble in my shoe was the fact the development and production environment ran from the same instance of WordPress and lacked a desired consistency to the look and feel.

Time to reboot

No problem, install a new instance of WordPress for development and apply a new theme to production. If it were only that easy. The fact of the matter is any theme (free or paid) will always need a certain amount of configuration or customization. Simply applying a new theme to production would have left the site looking half baked and/or broke while I worked out the details. Not a good idea. I decided to install a new instance of WordPress for production and to manually move content over after the configuration / customization was complete. Although way more work, the added benefit is the database won’t be filled with a lot of discarded trash. The other benefit is I would be able to apply a content standard to give the site some much needed consistency.

Wrap up

Published and archive content has been moved and updated using a newly developed content standard. Server configurations are complete and cascading style sheets updated. Accelerated mobile page functionality is installed although I have an issue with Adsense displaying on AMP pages. My opinion is the issue may be with the plug-in. Finally, performance tweaks like disk caching and gzip compression are in place. The Bezel theme I selected for the new site is lean and I appreciate that. One thing it doesn’t accommodate is content without sidebars and that is something I plan to investigate in the future. Where did I end up? A month’s worth of work netted me a gain of 4ms. I bounce between 4 and 5ms with an estimated loss of 19% due to performance. Just for fun a ran the benchmark against the Google blog and got the same number. I guess I can live with that. Enjoy : )

Epilogue
As luck would have it getting the domain(s) DNS situated took more effort than I thought. The result was the URLs “www.mygooglesites.com” and “www.thegoogleshop.com” were in the abyss for much of 8/18. Sorry about that.




Leave a Reply

Your email address will not be published. Required fields are marked *