Improve your WooCommerce site performance with this power tweak

By TeamUpdraft Posted Category Company news Topics Performance optimization, WooCommerce, WP-Optimize,

What is the WooCommerce ‘power tweak’ feature?

Section titled What is the WooCommerce ‘power tweak’ feature?

WooCommerce is a popular e-commerce platform for WordPress. It offers great functionality but also has its challenges. Our team found a problem with WooCommerce’s performance, and we created a ‘Power tweak’ feature that fixes it. This feature is one of two power tweaks available in our plugin. It makes your website more efficient by optimizing a WooCommerce database query.

What is the issue with WooCommerce?

Section titled What is the issue with WooCommerce?

We’ve found that WooCommerce has a critical performance issue related to one of its database queries. The query lies within a function called get_total_spent, used to calculate the total amount of money spent by a customer. The query makes a calculation using several double left-joins on the post and post meta tables for lookups. This process is inefficient, as MySQL must scan a large number of rows with each new order. On a typical site, this could involve scanning over 80% of the rows in the post meta table. In one case study, MySQL had to scan over 13,000,000 rows, significantly impacting performance and user experience.

As developers, we’ve learned that finding our own solution is often the best way to get things done. So, we engineered this feature to confront the WooCommerce query dilemma head-on. We suggested that WooCommerce use two simpler SQL queries instead of that one complicated query. However, in the absence of changes from WooCommerce, we’ve taken the initiative.

WP-Optimize has a feature called ‘Power tweak’. It replaces the problematic double left-join query in WooCommerce with two shorter, more efficient queries. This enhancement is crucial for sites with high volumes of orders.

To learn more and stay updated, check out our Github thread where our lead developer and founder, David Anderson, discusses this issue.

How to access the power tweak feature

Section titled How to access the power tweak feature

To use this feature, you’ll need the premium version of WP-Optimize.

About the author

Team Updraft Logo with dark background

TeamUpdraft

Our team consists of WordPress developers, marketers, and industry experts committed to providing you with the resources and skills you need to succeed online. Whether you’re just starting out or seeking advanced strategies, we’re here to enhance your WordPress journey and support you at every stage.

WP-Optimize

Get all our premium features. Lazy loading, pre-load key requests, Cloudfare integration. Optimize individual tables, delete unused images and more.

From just $49 for the year.

More stories

Our plugins

Try TeamUpdraft’s full suite of WordPress plugins.

  • UpdraftPlus

    Back up, restore and migrate your WordPress website with UpdraftPlus

  • WP-Optimize

    Speed up and optimize your WordPress website. Cache your site, clean the database and compress images

  • UpdraftCentral

    Centrally manage all your WordPress websites’ plugins, updates, backups, users, pages and posts from one location