Damn Good Content To Grow Your Business In The Digital World

Insights, Ideas and Innovations from the brains of the Saucal NERDS.

Suffering from Slow Search Speeds in WooCommerce? Give Your Site a Boost with this Free Upgrade
28 Sep

This post originally appeared on Codeable.

We’ve recently experienced some serious issues with WooCommerce search on eCommerce sites that process a large number of orders. The postmeta table needs to be queried when looking for a specific meta_value, which causes a major slowdown. For example, querying the “my orders” section would take 5s or possibly even more, depending on the server environment. To make matters worse, performing searches on the “Orders” screen for orders belonging to a specific email or person can take 30s or more (due to the involvement of extra JOINs on the postmeta table).

Both of the above examples are unacceptable for a website with high amount of traffic and had to be addressed.

Current Solutions And Associated Limitations

After doing some research, we’ve found that these issues are currently handled in one of two ways:

The ElasticSearch solution sounds good in theory, but our experience leads us to believe that it is not a good thing to integrate with WordPress. This is due to the huge number of differences between the base WP datasource (which is MySQL tables) and the ElasticSearch indexes.

While ElasticSearch performs partial searches very well and is pretty good at “guessing” what you intend to write in the search query, these minor benefits are definitely not outweighed by the downsides of integrating these two data sources:

  • latency between the ElasticSearch instance and your hosting provider (note that this won’t be an issue if you have ElasticPress installed on the same server as your PHP environment, but this is not a common scenario with today’s managed WordPress hosting solutions), and
  • the number of orders covered in each result (across all pages) is narrowed down to just a couple hundred.

In this case, we would need to query the ElasticSearch instance and then pass on the matched post IDs to WP_Query (while adhering to the max length of the SQL query being sent to MySQL). This breaks the workflow for wide range searches, and could potentially provide a misleading number of total results to the store manager searching the Orders screen.

Now, onto the secondary index table. The original solution was presented to us by Patrick Garman, a fellow WordPress developer. He originally intended to just improve the “My Orders” section of WooCommerce, but we thought that this fell a bit short for our needs.

We know that his current implementation is just meant to be a temporary fix until the release of WooCommerce 3.0 and the huge database revamp that is planned for it (which will fix the issues we are discussing in this post). We also know that WC 3.0 is not slated to be released until mid-2017, and since we need to make our customers happy before then, we forked Patrick’s implementation.

Our Proposed Solution

The original implementation of the order index only indexes the Order IDs and the Customer IDs in a secondary table (which is what Patrick set out to fix). His solution is to modify the “My Orders” WP_Query to use his index.

We extended this in a couple of ways:

  1. We’ve included the customer emails (both the billing email on the order and the customer email which is derived from the customer assigned to the order). Whenever you search an email in the orders view of the admin section, we trigger the use of the index instead of postmeta.
  2. We’ve included the customer names (billing, shipping, and display name of the assigned customer).

Here we come across an issue; we don’t want to completely remove WooCommerce’s existing search features, but we need to have some way of using the index conditionally for faster searches. This is because our index doesn’t support Address search, for example, and WooCommerce functionality covers that.

In order to achieve this, we’ve included a parameter like search. Whenever your search parameter is “name:John D,” we return all orders with names that match John D using a wildcard search. You could search for the Order ID in WooCommerce but we felt we could make it easier, so with our solution, you can just enter the search term “#1456” and have order 1456 returned to you.

How To Implement It

In order to install this index, all you have to do is install our fork of the plugin and then enable it. Here’s the URL: https://github.com/saucal/wc-customer-order-index

The only complication at the moment is that you need access to WP-CLI to create the initial index. We’re working on enabling an AJAX interface which will allow you to build the index without WP-CLI.

For now, after you enable the plugin, you need to open up your WP-CLI interface and enter the command “wp wc_coi reset_index” for it to start generating the index for you. The time this process takes will vary depending on the number of orders you have on your site.

How Things Have Changed

WooCommerce Search Before

With the use of this plugin, we have been able to vastly improve the performance of our customers’ large stores. Here above you can see an example where the time was up to almost 40 seconds. In one of our worst performing cases, email search on WP-Admin was taking over 50 seconds.

WooCommerce Search After

Using this plugin, we reduced the search time to less than 5 seconds, improving it by 867%!

Wrapping Things Up

We tried the ElasticSearch solution for one of our customers and it had too many moving parts for our liking. We prefer something that stays within the scope of WordPress and doesn’t require our customers to sign up for any external services.

To be clear, this is not a problem of ElasticSearch as a technology. It’s just that it’s too different from how WordPress works, so integrating the two created a few downsides that for us were deal breakers considering what we were trying to achieve. Additionally, we had to rely on a complex third party plugin (10up’s ElasticPress).

We iterated on Patrick’s approach and extended it to fulfill our customer’s most common needs. As a trusted WordPress agency, we know that this is not the prettiest solution since it duplicates a lot of the data. We just want to provide our customers with a solid workaround until WooCommerce 3.0 is released and renders this solution unnecessary.

Would you have done something different? Feel free to send us a pull request on our repository, we’d love to see alternatives!

High fives to our lead developer Matias for helping me with this article.

Discussing Bitcoin
08 Sep

I recently appeared on the Mastermind podcast to discuss bitcoin.

If you’re not familiar with Mastermind, it’s a podcast about building and running Your WordPress business. If you work with WordPress professionally, I highly recommend you subscribe.

In the podcast, I share how Saucal uses bitcoin to pay our distributed team. I also elaborate on the basics of bitcoin.

Listen to the podcast here. Please post your feedback in the comments.

Toronto WooCommerce Meetup: February 2016 Recap
16 Mar

Toronto WooCommerce Meetup - February 2016

February 27, 2016 marked the inaugural Toronto WooCommerce meetup.1 A meetup where shop owners, developers and budding online entrepreneurs can come together to learn and share stories.

I was eager to get the first meetup started.  I wasn’t sure what topics people would want to discuss. Consequently, my objective was to identify what people were interested in. With this, I would craft an agenda for the coming year.  Giving me ample time to prepare material, and find the right guests.

These are not definitive and will change, however we will follow a progression.  Without adieu:

1 – Starting with Woo: What platform should I use?

We’ll compare shopping cart platforms (primarily Shopify) and the pros and cons of each one. Then, we’ll get started with Woo to start selling online. You’ll be introduced to setting up a theme and installing plugins as well as the best resources for WooCommerce help.

Focus: beginner.

2 – Charging taxes: What are the rules?  

Which countries do you charge tax? Who do you remit it to?  How do I configure the tax rules in WooCommerce?2

Focus: intermediate.  

4 – Using WooCommerce for invoicing.

Running a services business?  Would you like an integrated invoicing system to your website? Learn how to use WooCommerce for invoicing your customers.

Focus: beginner/intermediate.

5 – Configuring multi-language for WooCommerce.

Find out which plugins to use, and what to look out for.  This is geared for those who sell in more than one language.

Focus: intermediate.

6 – WooCommerce plugins 101.

Get started with building your own WooCommerce plugin.  Do’s & don’ts and best practises.

Focus: advanced.

7 – WooCommerce theme development 101.

Get started with building your own WooCommerce theme.  Do’s & don’ts and best practises.

Focus: advanced.

8 – eCommerce marketing.  

How to setup a sales funnel and drive traffic to your website. Learn techniques to keep your visitors engaged and turn them into customers.  We’ll also discuss how to setup Google Analytics on WooCommerce.

Focus: intermediate.

9 – Using Amazon with WooCommerce.

During this session we’ll discuss Fulfillment by Amazon (FBA). All the ins and outs of drop shipping, products, reviews and more. Then, we’ll show you how to integrate your Amazon products into your WooCommerce store for greater effect. A special guest from Ordoro will speak.

Focus: intermediate.

10 – Scaling WooCommerce.  

What happens when you have 1000’s of customers or orders? How do you scale up your website so it’s stable and fast?  We’ll be having a special guest speaker Patrick Garman discuss from his experience with ColourPop.com.

Focus: advanced

11 – Selling themes and plugins.  

Want to develop plugins and themes and make some money in the WooCommerce marketplace?  We’ll have special guest Adam Pickering from Astoundify, who is one of Envato’s top selling authors.  He’ll discuss best practises and some of the challenges he’s had making world class themes for sale.

Focus: intermediate

If you’d like to see any topics up here, post them in the comments below. We’re looking forward to a great meetup with excellent content. Thank you!


  1. What is now Toronto’s go-to resource for all-the-things WooCommerce. 

  2. This will require the help of an accountant. If you know the answers to these, please holla at me

Saucal: Engaging Consumers Through WooCommerce!
14 Mar

HAAAANNNNN

Ecommerce has become a big deal; if you’re engaged in it in one form or another, you’ve at least heard about it. That can be problematic from a couple of standpoints: there’s a lot of competition out there trying to capture consumers’ attention—and there’s a lot of competition out there among vendors trying to help marketers do just that.

Business leaders are looking for the answers, and the expert support, to help them achieve results. That’s where Saucal comes in. Saucal designs revenue-maximizing WooCommerce sites that drive business growth. While others may be focused on building beautiful websites, our focus is on building websites that generate results (of course, we believe they’re pretty beautiful too!).

We’re not the only ones who think so. We’re confident in our work, but real validation comes from outside review. That’s what Clutch, a research firm based in Washington, D.C, offers us—third party perspectives on the value we provide which is gratifying to us but which, better yet, sends a strong signal to potential customers about the quality and scope of our services.

Clutch has reviewed thousands of agencies in the tech, digital, and content marketing space and selects those to profile on its web site based on their ability to meet client needs. Unlike some other sources, Clutch doesn’t derive decisions by what they see on companies’ web sites, or what companies have to say about themselves but, most importantly, by what these companies’ customers have to say about them!

Their research is extensive and involves an in-depth review of companies. Clutch seeks to validate the companies’ positioning and services by gathering evidence of proven experience through case studies, portfolio items, client lists and other indicators of market presence.

We’re delighted to have a profile on Clutch; we’re even more delighted to have been chosen recently as an up and coming top ecommerce provider! That’s a big deal to us; and a big deal to our customers! Our customers have shared some very gratifying input with Clutch as part of their review process.

For instance, one of our clients, the president of an oil and gas company, said: “We’ve had a high hit rate on our site. Our shareholders are interested in it… Saucal has a good team that understands our business and listens to us. They’re very responsive…”

Another client, the associate director of development for a music software company said: “Of all the development companies I’ve worked with, Saucal has excelled at making sure that the scope of work is dialed in before it’s actually started. I rarely have to add on additional work.”

We’re of course proud of our perfect 5 star rating. Our profile on Clutch offers potential customers a thorough summary of our services, including detailed charts showing prospective clients which industries we serve, a list of some of our clients, and a sense of what it’s like to work with us. Check out our profile or receive a free consultation for your next project!

You know how I know you’re a n00b?
09 Feb

I see a lot of agencies these days pivoting into WordPress (WP).  For example, I listened to a podcast for an unnamed company that specializes in Magento development.  When I searched for the interviewees Linkedin profile, I noticed his profile listed “Creative eCommerce Company, *Magento and WordPress1.  This is after hearing an interview, where he specifically said “the majority of what we do is Magento.”  So, why is WordPress listed?

Well, that’s where the money is. So, people feel the need to jump ship.  Unfortunately, knowing WordPress takes time. Experience needs to be built.   Though most say they have skills, they really don’t.

Anyhow, back to my point.  You know how I know you’re a n00b?  capital P dangit.

I could ignore a spelling mistake.  But saying WordPress2, instead of WordPress?  There is a function inside of WP that corrects this exact fuck up. So, you know how I know you’re a n00b?  Because you don’t know WordPress functions.

Peace.

Kanye West Mic Drop


  1. This is written with a lowercase p. 

  2. Again, with a lowercase p. See what’s going on here? 

Why I Stopped Managing My Own WordPress Server
21 Jan

picture of baby and meme about bad hosting

Managing my own server used to keep me up at night. I was constantly worried; about the software, whether all of my tools were up-to-date; what to do if something went awry (which happens with technology, because, well, it’s technology).

At the time, I was building Saucal, yet there I was managing a WordPress server, fighting fires, and wasting valuable time on tasks other than designing killer sites for you. It was a headache, and made it challenging to focus on building and running a business and serving you, our customers.

At Saucal our goal is to design stunning websites, that help you build your business and attract new customers. Playing firefighter with server management made that promise hard to deliver on.

Then one of our clients was hacked and I stayed up all night fixing it. That was the the last straw. I vowed not to self-manage my server again, and I immediate sought a better way.

We found WP Engine after some shopping around, and WP Engine’s managed WordPress hosting platform was a perfect fit.

And since we moved to WP Engine, we’ve noticed a huge difference, not only in the time saved by no longer grappling with service management, but in the performance of our customers’ sites.

WP Engine is a WordPress expert. You won’t find that anywhere else. Other platform providers simply say they know WordPress, where WP Engine knows it inside and out. WP Engine is a WordPress specialist, not a hosting generalist. That shows in the amazing support we’ve received from WP Engine over the more than two years we’ve hosted our site and several customer sites on the platform.

Along with incredible support, the user experience is top-notch. We use staging to design sites before pushing them live, so we can test them and ensure they’re perfect before deploying. And we get peace of mind from automated and on-demand backups, which enable us to restore our work to any point we choose. All that and a simple and intuitive UI, makes adding customers and additional staff to access the a WordPress install a breeze.

If you’re anything like me, you saw site migrations as a necessary evil. You hated them, but they needed to be done, despite the time, complexity, cost, and overall hassle. They took hours. WP Engine put an end to that, however, with the Automated Migration plugin, which in just a few clicks automatically migrates a WordPress site to WP Engine’s platform. We’ve gotten migration times to between five and 10 minutes—really just the setup time–which allows us to onboard more customers faster, and focus on what we do best: building beautiful sites.

And unlimited transferable developer installs eliminate additional host costs so we can work on any number of client sites we want. This saves us a bundle, lets us scale, and gives us the freedom to experiment.

WP Engine saves us time and money, and boosts our dev team’s morale. The platform works out of the box without any of the headaches.

I am now free to focus on building Saucal’s business and serving you, our customers, without having to worry about hosting. We can do what we do best: building and creating amazing, revenue-driving sites for you. We can focus on you and your success.

And on top of all that, we haven’t had any more hacked sites. We are confident that our sites and your sites are safe.