In the previous article, we talked about how to measure performance of websites and stores properly. Assumptions of what matters most in accounting for performance metrics were disproven and alternative methods for measuring performance of websites and stores were discussed. If you use caching on your site, or ran a pagespeed test recently, do checkout how to measure WooCommerce performance.

The background section above is an excellent refresher in how to measure performance and what methods are essential to capture the total picture of user experience. However, there are other metrics out there to calculate the performance of a site and WooCommerce store. There is one particularly useful method to measure how well a WooCommerce store is running, and that is through “Add to Cart” events.

When running a WooCommerce store, a developer wants to be sure that their store can handle thousands of various products, millions of dollars’ worth of potential sales, and high amounts of traffic without decreasing the performance of the site. “Add to Cart” is a method that can assist developers and users of stores in measuring the performance of the store.

As WooCommerce stores grow beyond a few thousand dollars per month in sales, store owners start asking, will it scale? They need this information to prepare for expected growth in sales and scale WooCommerce to accommodate new demand.

Instead of answering ‘It depends’ or throwing arbitrary values and statistics, we can look at this question another way. Measuring ‘Add-to-cart’ events in a specific interval can provide valuable insights in capacity and scale planning.

Add to Carts: How to Determine Your Goals

There are a few keys ways to reach a target goal while using add to carts per minute. One way is simply to keep track of what the current volume is and calculate an estimate about the growth needs of the store or site. While it’s simply an educated guess it does assist in predicating what potential the site has for growth.

Another possible way is to examine the traffic history of the purchases made during previous big shopping times (namely holiday seasons) and estimate what the current year’s sales are projected to be. This approach suggests that to properly calibrate the traffic history during busy times one must monitor the ATCPM volume on a normal day basis, as well as weekly and monthly, to know how the users experience the website or store.

One last approach is to talk about the ATCPM metric with other organizations that sell similar products to your store. This approach is very helpful but is not always available. This may seem like a far-fetched idea, but most competitors enjoy bragging about their dynamics of scale with others in their similar organizational field. A competitor may boast about the record amount of sales they had over Christmas; take their statement as a way to understand a competitor’s baseline for ATCPM.

The WooCommerce Basic Performance Principles 

To have a fast and successful WooCommerce, there are a few basic principles to follow to ensure this success. Always keep in mind that when you are working with or using WooCommerce that you understand that the world of WooCommerce is very fast paced; what you add to this world can make it not run as efficiently.

The Principle of Coding

Adding code to the website or store affects how fast the page ultimately loads. You may think it is a good idea to add copious amounts of code to create an engaging website, but please be aware that codes will slow down the WooCommerce page. When you create the code yourself always check whether to run or slow down aspects of code, especially if the code is not within context of the site. Keep specific product information code within the product’s own page; this is an easy way to avoid too much code on a category page.

The Principle of Plugins

The first rule of this principle is to always uninstall and delete the plugins that are not necessary! A recurring issue in WooCommerce is the use of poorly performing plugins. Plugins can be helpful to WooCommerce stores, but most of the plugins out there have bad code or unnecessary functions. Sometimes you get caught in the habit of using certain plugins for a WooCommerce store that you have had for a few years. These years old plugins will be most likely out of date and/or contain bugs that may lead to security problems for the store. Examples of plugins that lead to slow performance are: Visual Composer and Beaver Builder.

Bugs: Fix All Known Errors

WooCommerce sites and stores require maintenance and attention from their developers. A tool to ensure that the site is well taken care of is an error-log. All PHP-errors can be found logged into the error log, and if a developer sees errors listed in the log, then the priority is to eliminate them from the list. Goodbye errors, hello faster site!

It may seem obvious to fix the errors right away, and there is a good reason for it. WooCommerce sites are made up of multiple pages (even into the thousands), and that means there are quite a few places for errors to hide. Since you will have many pages to maintain, your users will probably end up visiting more pages than you. To avoid any embarrassing errors on the pages you don’t visit frequently, it is extremely pertinent to check the error log and resolve errors in a timely manner.

Another reason is that bugs truly do affect performance. One may think that a bug is just a warning and that it won’t be a serious threat right away, but all errors you may receive will take time to process and may consume vital performance from the site or store. An example of why it is important to fix bugs properly for a WooCommerce site is downloading a new version of software to the store without checking the error log.  This may create quite a few problems for the WooCommerce site and slow down the performance of the site greatly.  A word of caution: may take hours or even days to correct the bugs from error-logs, which will result in an inefficiently running website or stores for your users.

Remember to always pay attention to the front-end of your site or store because any bug will negatively affect the performance of the site. This means to diligently check the console, javascript bugs, CSS, and especially the HTML output.

Utilize W3C Validator

W3C Validator is a great tool to ensure that HTML is correctly written and created. HTML that is written correctly is fast rendering, which means that the browser won’t need to take time to calibrate how the HTML should be represented; the HTML will already be displayed correctly instantaneously. This saves resources and time for other operations within the store.

Keep .htaccess to a Minimum

The .htaccess file is an Apache Server configuration file. This file is used by hosting sites, such as WordPress, for rewrites (sometimes used for redirects as well). The plugins mentioned above (here’s looking at you Beaver Builder) will try to slow down a site or store using the .htaccess file. Developers are able to put .htaccess files in any holder, but the problem with this is that the webserver will look for .htaccess when a new file is requested. The request will take much time and energy, especially if the access file is large. A solution to this issue is fairly simple; if using Word Press (WP) as a hosting site be sure to use the default WP standard and plugins such as Redirection to assist with the redirects of the access files.

Use HTTP/2 Instead of combining CSS and JS

Multiplexing is a technology that comes from HTTP/2. This technology allows the server to send many files to the client or customer over one connection. This is different from HTTP/1 where every element on the page required a separate roundtrip. There is no longer any need to bundle files because doing so will simply add more work for an already simplified solution. Be sure to avoid files with PHP and any combined files with potentially poor performers such as plugins.

Use Correct Image Sizes

WooCommerce stores depend on images to sell merchandise. If using WP as the hosting site, utilize WP’s media function to manage your images. This is an old fashioned approach to image management, but it works very well for developers. WP does organize them in a variety of sizes and it is important to be careful when uploading images to the store to ensure the correct image size is being used.

You can also adjust WooCommerce image sizes if necessary. This can be done by following the path of going to WooCommerce settings, then products, then show. This is where one would find the three standard image sizes and you can adjust the dimensions of images so that they reflect what will fit in the store. The importance of using the correct image size is to save time; incorrect image sizes cause the browser to reload and resize the image whenever a visitor views the site.

Optimize Images

Images are a great way to sell product and make the WooCommerce site more appealing to potential clients. However, images can be a hindrance in terms of load time if they are not optimized. Correctly optimized images do not use a lot of data and reduce the page sizes in the WooCommerce store, resulting in quicker load times. Some examples of plugins that assist in optimizing your media are: Imsanity, TinyPNG, and Shortpixel. These three are great resources to use with image management and optimization.

Choose a Faster Hosting Platform

When you have the goal in mind to make a well run and maintained website or WooCommerce store, you will work hard to ensure success. However, no matter the amount of blood, sweat, and tears you put into your WooCommerce store, the quickness of your hosting site will determine your own site’s speed. You will want the hosting to be the fastest that you can get to have an optimally performing site.

Slow hosting can add unexplained delays while delivering pages to your customers.

WooCommerce stores and sites also need to examine database performance. As discussed previously, database performance is a key factor for WooCommerce developers because these stores are heavily run on databases. A database is key in the equation for a fast performance in shop efficiency. Pick hosting that doesn’t rely only on caching to work smoothly. In the previous article, caching was debunked as an effective tool for performance on a dynamic site. Caching will lead to a poor user experience for some of the store’s traffic because caches need to refresh often. For example, the cart in the WooCommerce store is not a good candidate for caching because a slow checkout time will derail return customers to your site.

Cache with Caution

Caching on WooCommerce requires careful planning and configuration. You need to make sure that shopping carts, orders, user account pages are never cached. Incorrectly configured page caching on WooCommerce can lead to customers seeing each other’s carts, order histories or other confidential data. This can lead to loss of trust, lost sales and even violation of PCI compliance requirements. Other safe ways to use caching are Object Caching and Transients.

The Object Cache is a method that temporarily imports the result of a database query to the memory (RAM) and the result is used at another time later on at the same pageload, but at a much faster speed. This method is ideal when reusing data across various components of your page. For example, your store is showcasing multiple products and requesting information about what is being displayed. The solution would be to use product information within the template; this will cut down on duplicate requests or queries and send product information back much more quickly.

Transients are similar to the Object Cache, but the difference is where the results are stored. Transients store results in the database, making the results across pageviews. Transients are versatile, but the best way to use them is by storing results of queries that are slow or rarely change. Results that need a lot of computing power and resources also work well with transients. Note: remember to set an achievable expiration date based on how often one may think the data will change or the frequency of updates.


Database Tips

When you have put in a lot of work and effort to ensure that your WooCommerce site or store is running smoothly, you want to make sure that you are optimized for business. There are lots of holiday seasons and events that make people want to shop like crazy. In order to keep the store running effortlessly, always be sure to maintain great performance within your database. Below are some helpful tips to give you an efficient store and the ability to cater to busy holiday traffic.

For better defaults, installing MariaDB to replace MySQL is usually a good choice. By replacing MySQL with this drop-in replacement you can experience upwards of 15% performance boost in database and wp-admin operations.

Basic database preparation and maintenance

  1. Log in to PhpMyAdmin, and look at the tables overview within the database.
  2. All tables should be InnoDB or MEMORY
  3. All MyISAM tables should be converted to InnoDB
  4. Run “Analyze table” on all tables in the database: this enforces indexes to be rebuilt and optimized to improve performance

When there is no traffic occurring on your WooCommerce site, run Optimize tables. This is an intensive approach and will cause the database to lag. But the operation will recreate tables to categorize them into size and order, which will improve overall performance.

More Advanced Database Tasks

  1. Mysql Slow Log: This service can be requested by chat box or email to check the Mysqld. Slow log for the website. Any slow operations will be sent directly to you via email.
  2. Query optimization: ensuring all repetitive queries make proper use of indexes. Not using indexes is a common problem that results in poor database performance.
  3. Limit the number of database queries: With your application you can control which queries are found on each page. Do not try to write code to run thousands of queries, rather than the usual hundreds. This will only create poor performance for the database.

Log files

  1. The AccessLog file is a list of requests that are served by the backend server Apache
  2. Always check for amplification requests; this should not result in many PHP hits
  3. Fix errors such as 403 / 500 / 503
  4. Examine the logs for occurrences of the error codes and fix any bugs found
  5. Fix 404 errors, otherwise they take up unnecessary resources
  6. Limit Redirects by linking correctly on your pages
  7. logs/ErrorLog, which should be free of all errors
  8. Check and fix All PHP bugs
  9. Application logs: ensure that all debug logs are disabled


  1. Run Cron as real cron jobs, not using wget over http
  2. Do not run cron jobs more frequently than necessary

Depending on your store design, some or all of these tips can bring noticeable performance improvements. We at ScaleDynamix like to say that performance optimization is a journey rather than a destination or a one-time project. Check out our managed WooCommerce service to automate ongoing performance optimization for your store while leveraging major cloud providers.