WordPress user roles: how are they stored?

WordPress lets site administrators assign roles to their registered users. These roles are, on a standard WordPress installation, Administrator, Editor, Author, Contributor, and Subscriber. Plugins can add custom roles. For example, WooCommerce adds Customer and Shop Manager roles. The roles assigned to each user are stored in the wp_usermeta table. In an ordinary single-site install … Read more

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

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

Slow WordPress Queries

Index WP MySQL For Speed, the WordPress plugin, allows users to monitor their MariaDB or MySQL database traffic and upload the results of those monitors. It gathers information about the queries, including how long they take and how many there are. Analyzing the uploaded monitor data allows me to identify the most frequent queries and … Read more

Power and Sustainability in WordPress

To improved sustainability of software like WordPress, it’s important to ask Where is power consumed? At the data center, at the client (the user’s machine or device), and in the network routers and line drivers used to transport the data. To reduce data center power: To reduce client power: To reduce network power, make your … Read more