Experience Varnish Compatible WooCommerce On Cloudways—Upto 100% Faster Web Performance!

by Ahsan Parwez  January 15, 2015

Launching an ecommerce store is really easy these days, thanks to many content management systems (CMSes) out there. There is the ever-popular Magento that is undoubtedly the best app for creating web stores. However, it is not easy to develop. This is why in 2014 we have seen the rise of simpler shopping platforms, like PrestaShop and WooCommerce. These apps have made it easy for novice web store owners to host ecommerce websites containing hundreds of products.

According to a 2012 study titled Interconnected World: Shopping and Personal Finance, 44% of online shoppers begin by using a search engine. This means almost half of your web traffic comes from search. So, how will you do good on a search engine? By having a speedy website which is optimized for good performance. Speed matters when it comes to online commerce ventures. It is one of the biggest factors in user experience. Amazon calculated that it lost $1.6 billion if page load time increased by a second. That’s not chump change.

Like many ecommerce platforms, WooCommerce is resource hungry too, especially when your web store has a large inventory of products. Therefore, it has an entire community dedicatedly working to improve it by fine-tuning plugins, themes, and even servers to optimize the performance.

Apart from this, WooCommerce themes and setups are generally complex with dynamic and static elements all jumbled up on a single page, making the advanced caching systems tough to setup. This is why having a caching mechanism, like Varnish, is vital for speedy performance.

But, it is not as easy as I put it there.

There are some limitations as many are still unable to utilize advanced caching systems like Varnish. If you google “WooCommerce Varnish” you will come up with many threads and discussions about making WooCommerce and Varnish compatible. Some may have the answer, but the setup is so confusing that it frustrates WooCommerce store owners who are not tech-savvy.

At Cloudways, we are always looking for ways to improve performance of our servers and work on the suggestions provided to us by our clients, developers, agencies, and the community. Keeping up with the our long standing practice, we have worked out a fitting solution that harnesses and augments WooCommerce + Varnish compatibility.

As a simple solution to address the needs of WooCommerce users, Cloudways has integrated 1-click installation of WooCommerce. Now you can launch WooCommerce on SSD-powered cloud servers that are optimized with Nginx, Varnish, Apache, PHP-FPM and Memcached through Cloudways Platform that simply outperforms other hosting solutions available. To experience WooCommerce with Varnish simple select WooCommerce as shown in below gif.

install woocommerce on cloudways

Here are the load tests results comparing the performance of WooCommerce without Varnish and WooCommerce with Varnish.

Without Varnish, the average response time is a whopping 1779 ms.

woocommerce without varnish

With Varnish, the response time is a steady 6 ms.

woocommerce with varnish

If seen in a graph format, the response rates suffer as more and more users access the WooCommerce store running without Varnish.

WooCommerce Without Varnish load test

 

And in case of Varnish configured properly on WooCommerce store, load testing results show that response rates becomes steady as more users access the website. Only on the first few visitors the response is high, but when the HTTP requests are cached, the new users experience a smooth response time.

WooCommerce with varnish Load Test GraphThe tests clearly show that the server’s average response becomes stable even when 500 users are accessing your website, while the server without Varnish struggles to respond to every new visitor coming in that causes the site to slow down. It harms your business.

One of our early adopters—WooCommerce was available as a beta app since the start of this year—Dan is impressed with our service:

“Fast servers with speedy WooCommerce makes me wonder why I was with ‘Slow Daddy’ for so long. Best load times! It feels like I am working on a website locally.”

So, What Is Varnish?

I think it is fitting to explain this cache technology in a few words. Varnish is a caching system deployed on the front-end of the server that handles HTTP requests. It speeds up the web application’s performance by a significant margin (Varnish-cache.org official statement claims that it speeds up the performance by 300 to 1000 times.)

Why Use Cloudways To Host Your WooCommerce Store?

For the very first time, Cloudways has introduced a platform through which you can launch Varnish Compatible WooCommerce stores on top of reliable cloud infrastructure like DigitalOcean, Amazon Web Services EC2 and Google Compute Engine. Cloudways Cloud Hosting Platform is truly remarkable, on which you can launch an otherwise complex application in under 5 minutes on cloud infrastructures in just a few clicks; making it possible for the non-techs to take advantage of performance and reliability using VMAN optimization technology.

An optimized and fast performing ecommerce store delivers the best user experience for your customers. They won’t get frustrated with sluggish speed of your website. Even search engines like Google give high priority to websites in SERPs that have impressive loading speeds. Plus, slower websites get terrible word-of-mouth. I leave you with this thought: 79% of visitors do not return website that has poor performance and according to a 2012 study by American Express, a disgruntled customer will talk about a poor experience with 24 people. And, that’s the average!

So, if you want to focus on your business and growth and don’t want to invest time in server optimization, then Cloudways is definitely the best choice for you. Start your WooCommerce Hosting free trial from the banner below.

Start Creating Web Apps on Managed Cloud Servers Now

Easy Web App Deployment for Agencies, Developers and E-Commerce Industry.

About Ahsan Parwez

Ahsan is the Community Team Manager at Cloudways - A Managed Cloud Hosting Platform. He loves to solve problems and help Cloudways' clients in any aspect he can. In his free time, you can find him playing RTS PC games.

Stay Connected:

You Might Also Like...

  • Hi,
    I’m a bit suprised, is this service new? I was able to test this WooCommerce app 2 weeks ago. The regular WordPress app doesn’t work with the Ajax shopping cart.

    • Uğur Mutlu

      I am also wondering if CW could find a solution for this issue. Has anyone tried yet?

      • Uğur, you are using the regular WP as an app. We have the Varnish + Woo as a separate app in our one-click installer list. It has no issues with the Ajax. Launch a new WooCommerce app and do give us your valuable feedback. 🙂

        • Uğur Mutlu

          Syed, is there any KB for migrating from wordpress app to a Woocommerce app? I am not sure if copying all files and replacing the preinstalled woocommerce and wp files would work well.

          • Ugur, you can do this. Launch a new Woo stack and then migrate your files from WP stack using SFTP and export the WP database to the Woo Database. Make sure that config files are updated to use database that has been assigned for new WooCommerce application.

            If however you have any problems in the migration, feel free to contact the live chat support and they will help you out.

    • Currently I’m using their woocommerce app and after over a month I just realized that the ajax shopping cart are not working. I hope CW will fix the issue.

      • Febby, your website is showing under construction page. So we can’t exactly trace the problem.

        Other than that, it was not the issue of Ajax. WooCommerce was supposed to delete the WooCommerce cookie : woocommerce_hash when someone is emptying cart and that was conflicting with one of Varnish Cache rule. Our devs modified the Varnish accordingly. Once your site is ready, you can test the cart and Ajax will definitely works.

        • Hey @swaseemabbas:disqus thanks for responding and great to know that the ajax is not the issue. Currently, we’re still developing our site and we’ll give it another try after everything is in place. I’ll update you if there are any problems. Thank you 🙂

    • Olaf, yes. WooCommerce was available for a few days before the actual launch. We think it is best to let people have a run of the service before we make an official announcement. This was sort of a beta testing phase. After fine tuning the Woo + Varnish now we think it is the best time to go official 🙂

      The regular WP app + Woo won’t work properly due to Varnish VCL that we are using is different in that case, that means Varnish rules are different.

  • Peter Cralen

    E-commerce site has to be PCI compliance, using HTTPS, bc payment – transactions and security at all.
    So, varnish is out, bc. its not compatible with HTTPS … or did I miss something ?

    • According this article it should be possible to use Varnisch with SSL:
      https://www.digitalocean.com/community/tutorials/how-to-configure-varnish-cache-4-0-with-ssl-termination-on-ubuntu-14-04

      The question is if the CW setup is the same 🙂

      • Peter Cralen

        interesting, but still it looks more like experiment than stable and secure solution with performance benefits 🙂

        • Right seems to be a custom setup, you can have a fast woocommerce site also without the use of varnish

          • Peter Cralen

            yep, that is point. I had problem with varnish even with contact form 😀 after that, I turned it off everywhere and don’t wanna hear about it more 😉

    • Dimitri

      Hi,
      I use wp/woocommerce with varnish. I use SSL only to checkout and account pages. SSL is not really important to show post/pages or products.

      • Agreed Dimitri, SSL should be used on account and checkout pages because that is where you actually need to encrypt your/customer information.

        In case you guys heard that Google made SSL a ranking factor and should be used site-wide, then I should remind you all that site loading speed is a higher ranking factor than SSL. So better take advantage of speed (Varnish) rather than going for HTTPS sitewide 🙂

        • I think SSL is also about trust and speed for mobile phones (SSL + SPEEDY) . Varnish is great for article pages, but I would think twice about using Varnish on other types of websites (sites with a lot of user interactions). You can make a site fast also without Varnish 🙂

        • Peter Cralen

          SSL is not only about checkout pages or account details and sure not about google’s ranking factor. You are sending datas also in contact forms, subscription forms, polls, feedbacks, surveys …

          Its about security at all while browsing, about trust … Certificate also provide authentication for your domain …

          Push people do not use SSL bc. you in CloudWays dancing around Varnish is not good idea.

          • Our idea of implementation of Varnish and SSL is far wider as we offer both and here we ask developers to be smart while implementing it.

            If you plan to use subscription forms, polls, feedbacks, then you can structure your website in such a way that forms have their separate pages that have SSL or the block/elements in which forms reside, are loaded with HTTPS

            I agree with your points but we never intend to promote one feature and discourage others, our purpose here is to deliver best possible hosting with all the features that others are not ready to use.

          • Peter Cralen
          • Thanks for suggesting it, we are already in phase of testing SPDY, that will be useful for those who plan to use SSL sitewide 😉

          • Guest

            good news, that is what I wanted to hear 🙂

  • László Tavaszi

    I wonder if woocommerce compatible varnish confug is available in your wordpress 4.1 app too. As woocommerce tipically a part of a worpress site/portal its seems to be logical to include it in this app to. Personally we plan to migratefrom php stack to wp app to get good caching, and this new feature could be the extra do it now reason. We shouldnt be alone!

    • Laszlo, the reason we added Woo as a separate app is because the Varnish rules are different for that stack. If you launch php stack and install WP on that manually then you will lose out on our W3TC configuration and hence void Varnish use.

      Varnish will also not work properly due to different VCL we use in case you launch WP then install Woo.

      I suggest you migrate over to Woo app to take full advantage.

      • László Tavaszi

        Ahsan, thank you for your reply. I would like to ask if WooCommerce stack will fit with our WP+W3TC+WooCommerce site too?

        • Yes Laszlo that will work fine. Launch the Woo stack and deploy your site on that.

          • László Tavaszi

            OK, thank you, I will…

  • Nel

    After tried to deploy WooCommerce on DO with 512ram droplet, I’m pretty amazing that Varnish works perfectly with WC and got bleeding speed. And has no error about items counting of Ajax cart.

    • Good to know that you are loving Woo performance on our platform 🙂

  • László Tavaszi

    I would like to ask if Woo stack rules are comaptible with Woocommerce 2.0.20?

    • We support the newer version of WooCommerce on our Woo Stack which handles the sessions and cart differently then WooCommerce 2.0.20. Therefore, 2.0.20 is not compatible.

      • László Tavaszi

        OK, thank you very much, it’s a good, usable information for migration.

  • Seriously

    This is comical. Most functionality of an ecommerce platform is personalised ergo cannot be cached, the heavyness of WP and woocommerce is in the millions (exaggeration) of database calls it makes, without PROPER load testing and PROPER user simulation (clicking on functions/links) this cannot be measured. Throwing some load simulation at a cached index page is nonsensical and has ZERO bearing on how an app performs. Secondly 4313 maximum response at 500 users on a cached page is AWFUL. Thirdly anyone using woocommerce for their ecommerce is either insane or a very small website ergo performance gains don’t really account for much. Fourthly even with Varnish there are still MANY reasons why WP / woocommerce is slow, least of which is the way it renders the dom.

    • I guess you misread the blog, for clarity we have updated the load test images labelled “With Varnish” and “Without Varnish”. The response time you quoted “4313” is without Varnish while with Varnish averages around at 6ms, that is impressive.

      And, we need to understand, each WooCommerce website is structured differently, running different set of scripts, plugins and themes that are sometimes compatible out of the box and other times they are not. It is then our job to smartly configure rules of cache on pages and elements that can work properly.

  • @AhsanParwez:disqus – Is the Woo app now compatible with SSL? My WordPress/WooCommerce site is all-SSL so I’m wondering if it would be compatible now with your Woo App and would see the benefits of your Varnish setup? Or would the https pages still bypass varnish anyway?

    • Unfortunately Varnish won’t work over HTTPS because SSL is terminated over Nginx and HTTPS request will be bypassed by Varnish.

      But still how about you test your Woo store over Cloudways, I am sure you’ll see improvement in performance 🙂

  • Paul McCann

    How do we configure our own woostack to take advantage of the varnish cache? I used the importer and so its not on your stack. Do I just need to install the W3T plugin and set it up?

    • We have made a custom VCL for Woostack. In order to take advantage of it you need to launch WooCommerce and use our configuration of W3TC. Our live chat will help you out in this regard.