Capturing and examining queries

This entry is part 2 of 2 in the series WordPress MySQL performance monitor

It’s straightforward to get WordPress to capture the MySQL queries it uses to generate each page view. We can then analyze the captured queries. Capturing WordPress offers a way to capture a list of the database queries it uses in each page view. It’s simple: define the global SAVEQUERIES symbol. You can define it permanently … Read more

Analyzing WordPress database operations

This entry is part 1 of 2 in the series WordPress MySQL performance monitor

People are using the Index WP MySQL For Speed WordPress plugin! That’s great. But it shoots into the dark: nobody can tell how much improvement they’ve seen except subjectively. That’s not good. It’s hard to improve something unless we can actually measure it. Two things can make a troublesome query. If it runs just once … Read more

WordPress multisite programming tricks

This pulls together some notes on handling plugin programming for WordPress multisite (network) installations. Basic information Lots of this information comes from the globally instantiated $wpdb object. Tables To get a list of WordPress tables you can use the wpdb::tables() method. Here’s a quick way to get a useful list of tables. This list include … Read more

Snippet to add Edit link to category archive page

WooCommerce and its Storefront theme display so-called category archive pages to list products in the category. If the category includes a description, it shows at the top of the page along with the category’s name. This php snippet adds an Edit link to those pages allowing a privileged user logged in to the Dashboard to … Read more

Speeding up WordPress database operations

Rick James and I have cooked up a plugin, Index WP MySQL for Speed, to help optimize the way WordPress uses its MySQL database. It adds indexes to WordPress’s tables in MySQL to allow them to deliver data more efficiently without needing WordPress code changes. Users do not see any change in functionality, only in … Read more

Transcoding JPEG optimizer from Mozilla

The people at Mozilla have produced a transcoding JPEG optimizer. https://github.com/mozilla/mozjpeg/releases This thing is sweet: it takes ordinary JPEG files and recompresses them much more efficiently without making the images deteriorate. It uses the long-standing and well-tested Independent JPEG Group reference implementation, and adds a bunch of optimizations. It’s not built for GUI users; it’s … Read more