Speeding-up WooCommerce sites

W3 Total Cache plugin logo

Performance is a priority for all website administrators these days. Particularly with content management systems (CMS), web admins tend to employ a wealth of powerful theme frameworks (ex: page builders) and functional plugins on top of their base design and content. These in combination offer amazing features, but can pile up and take a toll on performance. As traffic scales, so too will your performance bottlenecks.

While the more popular (vetted) plugins usually serve their purpose well, the risk of slowing your site down increases as your use of plugins increases – due to the average resource consumption of each unit of functionality. This is especially noticeable with plugins that connect to remote services either with PHP APIs or with AJAX front end widgets. Let’s face it – these days we do need some plugins that connect with remote services and those will consume resources.

The most important tool in improving performance is having an optimized web host.

Managed WordPress hosts optimize their web server environments for WordPress and bundle in best practices like page caching for unauthenticated traffic and web application firewalls (WAF). Top tier providers often bundle a content delivery network (CDN) system to geographically serve assets. They also may bundle application performance monitoring (APM) tools to detect and debug any resource-intensive operations within your plugins or theme. There are many solid hosts that fit this criteria and the obvious example would be WordPress.com*. You get what you pay for with hosting, yet optimized infrastructure is surely within reach.

Now I’ll step beyond the host itself and delve into specific areas you can examine. Begin by measuring where you stand currently, even if you plan to change hosts. You never can measure enough! Use tools like GTmetrixPingdom Website Speed TestWeb Page TestGoogle PageSpeed Insights to measure with. At full bandwidth your pages would ideally load within 2.4 seconds – the time conversions begin getting affected – and never go beyond 5.6 seconds. Pay attention to the differences between render time versus fully loaded time and your page size.

If your host doesn’t bundle one, investigate the best caching plugin and settings for your usage. Popular self installation options are: WP-Rocket (paid) and W3 Total Cache (free).

Here’s my advice to help you optimize your performance.

You will need to fully test your site with each change, so take your time and be careful! Use a staging site if possible, and always backup your live site before tinkering.

  1. Keep your software up to date! Often times updates contain fixes and performance improvements, plus with out of date software you have a hard time finding good support.
  2. Use CloudFlare, even if at the free level of service, to prevent DDoS, credit card guessing, brute force login, and other types of attacks before it even makes a dent on your web host. Upgrade for more advanced tools and features, including many items in this very list.
  3. Clean your database with WP Optimize or WP Sweep plugin to remove unnecessary orphaned records, post revisions, etc.
  4. Examine your wp_options DB table to remove any autoload=yes values that no longer apply to your active plugins or theme, meaning from past plugins that you no longer have in use. Be careful doing this, as you don’t want to remove needed data! Always back up before deleting things.
  5. Enable page caching for unauthenticated traffic to be served from server RAM instead of PHP processing.
  6. Enable object caching with Redis to optimize data and transient performance using server RAM.
  7. Enable database caching to keep query results loaded in server RAM.
  8. Use a paid CDN like JetPack Photon, Fastly, MaxCDN, or AWS CloudFront to serve your media (primarily your images) from satellite servers around the globe.
  9. Enable gzip compression to ensure the web server and browsers optimize bandwidth transfer.
  10. Enable browser caching to ensure browsers keep a copy of your images, JS, and CSS assets
  11. Lazy-load widgets by delaying JS execution as late as possible, towards the bottom of your HTML body and triggered by jQuery ready state or later.
  12. Minify and combine JS and CSS asset files manually, via your caching plugin, edge services, or your theme itself.
  13. Optimize images, TinyPNG plugin or other image compression and optimization of your Media Library.
  14. Stream videos using Vimeo, YouTube, JetPack, or Ooyala instead of trying to hose them yourself. These services optimize the bitrate and options for the devices being served.
  15. Consider Google’s accelerated mobile pages (AMP) format for mobile browsing using a plugin to serve it, if your site is content heavy and you are okay losing normal web page features to speed-up mobile traffic. (Note: WordPress.com has this built in already.)