WooCommerce key improvement

WordPress’s WooCommerce plugin uses a table called wp_woocommerce_order_itemmeta as an extensible key-value storage mechanism for order line items. Its parent table is wp_woocommerce_order_items. These two tables work similarly to wp_postmeta and wp_posts, and have the same performance issues. In large sites with a long history of orders, lookup may be slow. wp_woocommerce_order_itemmeta This DDL, usable … Read more

Elementor Performance

I’m seeing a lot of questions about sites being slow. Anecdotally, it seems like many of those are Elementor sites. So a database performance fanatic like me smells an opportunity to make improvements. Some of the WordPress punditocracy says “don’t use Elementor”. But, they have over ten million downloads. So let’s help those sites if … Read more

Optimizing WordPress Database Servers

It’s common, and frustrating, for WordPress sites to be slow. When a site is slow for visitors, they give up and go elsewhere. When the dashboard is slow for site owners and content editors, it makes it harder to maintain the site, post new stuff, and handle orders (if it’s a store). Database Optimization Plugins … Read more

MariaDB has dodged the Y2038 date rollover

In a release note for MariaDB 11.5.1 (a release candidate). The TIMESTAMP range of values was extended. The maximal allowed value for timestamps was ‘2038-01-19 03:14:07 UTC’, and is now ‘2106-02-07 06:28:15 UTC’. This does not change the storage format, and new tables can be read by old MariaDB servers as long as timestamp values are within … Read more

Setup Problem at Google Workspace for Nonprofits

Recently I worked to help a local nonprofit org sign up and start using Google Workspace for Nonprofits. It’s basically private-labeled gmail and Google Drive. An org can use their own domain to get email. For example, if you use Google Workspace you can get your email at programs@example.org address instead of programs.example.org@gmail.com, or whatever. … Read more

Database Keys in Scalability Pro

Scalability Pro is a paid plugin for improving backend WordPress and WooCommerce performance. It does multiple things including query rewriting and memoization caching of some time-consuming database queries. One thing it does is add keys (indexes) to some WordPress tables. This article is a table-by-table analysis of some keys it adds, compared with the keys … Read more

Slow searching for WooCommerce orders

Background WooCommerce offers a search box on the WooCommerce -> Orders page. It lets a shop manager search orders, current and historic, for the customer’s name, address, email, and other data. It also searches the names of products and shows orders containing those products. On large sites with many orders, the search is astoundingly slow. … Read more

SQL_CALC_FOUND_ROWS in WordPress

Background When presenting so-called “archive” pages of content to users WordPress uses the notorious SQL_CALC_FOUND_ROWS MySQL extension to populate its display that looks something like this. This kind of user interface is known as “pagination” because it lets the user select pages of results. So, it’s really useful. The phrase “Showing 1-12 of 1348 results” … Read more

Counter

Here’s a way to put a counter that updates once a second in a page. It’s based on the time. This isn’t some earth-shattering discovery, it’s trival. But somebody asked me. 123 is the count now!