Gathering diagnostic data for plugin support

What’s this problem? WordPress plugins run on a variety of sites running on a variety of server configurations, and a variety of other plugins. It’s common for unexpected configurations to cause trouble for plugin users. Then, users open support threads saying “something went wrong.” The plugin authors then need to ask for configuration information to … Read more

Setting up a WooCommerce shop

Somebody asked how to set up a WordPress / WooCommerce shop with the Flatsome theme. Understand that this is a web site operations project, not a development project, at least until you get it basically working. For now, ignore any advice to use Bricks, Elementor, Divi or some other site builder. You’ve chosen Flatsome. Get … Read more

Can I use custom HTML and CSS with WordPress?

You can, but you’re using it in a different way than you would on a full-custom site. Back in the days of Adobe Dreamweaver, people crafted their web sites from HTML using an HTML-aware text editor. It could edit Javascript and CSS too. It was possible, and indeed necessary, to write custom HTML for everything, … Read more

ffmpeg Metadata Processing notes

I find myself needing to hack ffmpeg metadata in order to post Gordon Bok’s collection of Kalmyk music. The files ripped by ITunes contain all sorts of metadata. It can be extracted by a command like this and the output looks like this, including a bunch of ITunes-specific metadata items, as well as identifying metadata. … Read more

php’s microtime() function

This entry is part 3 of 3 in the series php features

php’s microtime( true ) function returns a floating point number of seconds since the UNIX epoch. On my computer each call takes about 200ns. The same is true of the time() and hrtime() functions. hrtime() is more modern and gives nanosecond resolution, so use it if possible. It’s available in php 7.3 and beyond. By … Read more

APCu in php — some notes

This entry is part 2 of 3 in the series php features

I’ve been working on the SQLIite Object Cache plugin for WordPress. I’m using the APCu User Cache, php’s RAM cache subsystem, to accelerate cache lookups — specifically to support wp_cache_get() and wp_cache_get_multiple() operations. I’ve had to figure out a few things about this php feature. Here are some notes. Its documentation is not as comprehensive … Read more

SQLite3 in php — some notes

This entry is part 1 of 3 in the series php features

I’ve been working on the SQLIite Object Cache plugin for WordPress, so I’ve had to figure out a few things about using SQLite itself and php’s SQLite3 extension. Here are some notes. There are various versions of the SQLite software around. If you will run your code on multiple different hosting providers and server configurations, … Read more

Improving WordPress core search

WordPress’s core search capability is very simple and very primitive. That can be frustrating. We’re spoiled by Google, Bing, and the other search engines which have had decades to get really good. What makes them good is a lot of information beyond the content of any given site, and thousands of programmer labor years making … Read more

WordPress’s Query Monitor: slow and duplicate queries?

John Blackbourn’s Query Monitor plugin sometimes reports slow queries and duplicate queries. How can you interpret these reports? What are slow and duplicate queries? Slow queries Query Monitor defines slow queries as those that take more than 50 milliseconds (1/20th of a second). Query Monitor shows query times in seconds in the rightmost column of … Read more