Woocommerce is a fantastic platform for those that sell online. Giving users the ability to sell digital goods, products and services with a couple of clicks straight out of the box (ahem repository). It truly gives WordPress a complete, safe and reliable eCommerce solution that also accounts for over 30% of all eCommerce sites on the web!
When selling online you need a fast and frictionless transaction, and page speed plays a big role, not in only user experience- even Google uses site speed as one of many ranking factors.
My only issue with Woocommerce is speed, and they’re mostly not at fault either. Stores utilising shared or budget hosting are the real cause. Excessive or un-optimised plugins, bad HTML, scripts and even themes can also be a problem.
So today we are going to learn how to speed up your WordPress eCommerce store on your average shared or low budget hosting offerings. These tips will also work wonders for those on more upmarket hosting solutions as your eCommerce store can never load too fast.
To start, we’ll be looking at-
- Cache Solutions
Let’s start by benchmarking our site. This will give us a clear and concise starting point to see if our Woocommerce speed up tweaks are working or not. Visit Pingdom Tools, enter your site address, chose the closest server to you and begin. Basically, we want to look at load time and page size since they are directly related. Our tweaks will also reduce the number of requests, connection errors and give you a performance score with the line “your site is faster/slower than X% of websites tested”.
Another great service to benchmark your website is GT Metrix. I’ll be using Pingdom as it tests the site from my location within Australia.
First and foremost we need to create a backup of your site. Even as most of these tweaks are relatively safe, we want to be able to roll back should we run into some issues. Either do this through cPanel or with a WordPress plugin like Backupbuddy. cPanel backups can look a little daunting but are simple when following this easy guide.
There has been a lot of talk about plugins being the root of all evil when it comes to WordPress site speed but I beg to differ. A well coded and optimised plugin should not increase page load time by any meaningful, measurable amount. In saying that, Woocommerce is a very, very big plugin and with all those powerful features, it’s sure to impact load times in most cases. Another thing to consider is that sometimes, plugins are unavoidable for a fully featured Woocommerce website.
Let’s start by removing or disabling any unused, outdated or superfluous plugins.
Checkout the image below of just a few that I run-
As you can see, most of these are absolutely essential to a fully function Woocommerce eCommerce site, not to mention I have a further 15 Woocommerce specific add-ons below the image as well.
WordPress by itself does not cache content. Every time someone visits your page, WordPress checks its database to make sure the article/content is there and then serves the freshly generated page for viewing.
A cache plugin alleviates this by serving a cached copy of your content to your visitors, removing the database queries and significantly improving your site’s overall speed. Cache plugins though do not work as effectively with Woocommerce as most eCommerce content is dynamic, like user logins and the whole cart and checkout experience. That’s not to say a cache plugin won’t improve performance- it will and by a large amount especially on static pages!
I prefer w3 Total Cache as my plugin of choice. So visit w3 Total Cache, upload, install and activate it. Once done, you should now have a performance menu under settings in your dashboard, click General Settings to get started.
We want to enable (tick) the following-
Page Cache, Database Cache, Object Cache & Object Cache
Once done, select ‘Save All’, and empty the cache when prompted. Now once again, do a speed test on your site and marvel at the quicker page load speed.
Content Delivery Network
Ok, so now we have a fairly quick Woocommerce site it’s time to further improve page speed with the use of a Content Delivery Network or CDN.
A content delivery network (CDN) is a system of distributed servers (network) that deliver web pages and other Web content to a user based on the geographic locations of the user, the origin of the web page and a content delivery server.
There are many providers of these and choosing the most appropriate service should be based on the geographic location of said CDN’s servers, reliability and price. I’ve used many in the past but find that for an Australian site targeting Australian customers, Cachefly worked best for me.
Simply signup for a free 14-day trial, login and choose ‘Delivery Options’>’Reverse Proxy’ and turn the switch to ‘ON’, taking note of the Origin Hostname as per the image below.
Now we simply need to go back to w3 Total Cache general settings, scroll down to CDN, enable the checkbox and click save. Then go to Performance>CDN and add the Hostname you got earlier from Cachefly Reverse Proxy and hit ‘Save all settings’.
That’s it! You have successfully set up a CDN. Now all traffic will be served directly from the CDN’s servers instead of your average, shared host. Do a speed test to measure your improved site speed.
The title of this article says ‘Free’ so here’s a free CDN type service for those that don’t want to pay for a full featured CDN.
CloudFlare works very similarly to a CDN but offers further site protection on top but all at a slightly slower speed than an all out CDN. CloudFlare is also free unless you choose a business tier option.
Once setup with CloudFlare, its web traffic is routed through a global network. Just like a CDN, CloudFlare automatically optimises the delivery of your web pages so your visitors get the faster page loading. It will also block threats and limit abusive bots and crawlers from wasting your bandwidth and server resources.
Setting up CloudFlare is as simple as turning the feature on in your cPanel (if available).
Should your web host not have CloudFlare integration please check out their setup guide here- https://support.cloudflare.com/hc/en-us/articles/201717894-Using-CloudFlare-and-WordPress-Five-Easy-First-Steps
With just the simple tweaks above we have cleaned up WordPress and its plugins, enabled Caching and even implemented a CDN!
Now’s the time to do one last speed test and admire your results. Ideally, we should be aiming for under 4 seconds page load time, but using a good host could easily have this under 2 with the exact same tweaks applied.
Enjoy the speed, improved customer satisfaction and better Google rankings.