APCu in php — some notes

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

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

php, Ubuntu, fpm, xdebug, PhpStorm

Here’s an oddity which baffled me and kept me from being able to use xdebug with PhpStorm for a while. I installed a bunch of different versions of php on my Ubuntu VM. I used Ondřej Surý’s repository, rigging my vm to install them like this. Then, I followed the directions emitted by the installer … Read more

My thoughts on WordPress these days

This entry is part 1 of 2 in the series WordPress alternatives

I’ve been successfully hacking WordPress more or less regularly since 2008. It’s good software, and it’s aged reasonably gracefully, feature- and bloatware- wise, compared to many enduring software brands. Its developers have been insistent on backward compatibility while they painstakingly built a community of loyal developers and users doing all sorts of amazing things with … Read more

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