APCu in php — some notes

This entry is part 2 of 2 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

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

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

Sonic search: notes on its use

I have been working on a WordPress search plugin to use Valerian Saliou‘s Sonic search backend. It is a lightweight alternative to backends like Elastic Search. Its straightforward approach to normalizing natural language queries makes it useful for searching WordPress content. And its speed and feature set lend themselves gracefully to autocompletion. Using Sonic in … Read more

Get started with WordPress Development

Someone asked how to get started developing with WordPress. Here’s my take on it. You gotta learn to use it first. These are steps to getting power-user skills. Hosting Buy an account on a budget hosting service. ~US$10 per month is a reasonable cost. It MUST support multiple WordPress sites. Sometimes these are called “subdomains” … Read more

Names in WordPress settings API

To plugin developers WordPress offers the Settings API. It lets us define settings pages, sections within those pages and fields within the sections. WordPress Settings API We use WordPress options to store configuration variables for our plugins. The settings API lets us create pages in the WordPress back-end dashboard to allow users to enter and … Read more

Jetbrains Gateway is really nice

Jetbrains, the Czech company that makes PhpStorm, WebStorm and Intellij-Idea, has their Gateway product in beta. It works like this: you run the Gateway software on your desktop machine — you know, the one with the nice display — and it connects to some other development machine to run your IDE. I’ve been using it … Read more

Filtering Database Changes During WordPress Updates

During its occasional and automatic core version updates (for example from version 5.9.2 to 5.9.3) WordPress inspects its tables in its database server (MariaDB or MySQL) and tries to restore them to WordPress’s standard schema. Sometimes a site owner or plugin customizes those tables. For example my Index WP MySQL For Speed plugin reorganizes some … Read more

Big WordPress Instance for Testing

Here’s a WordPress instance with 100,000 fake users made with the DemoPress plugin. It also contains fake posts, pages, and comments. If you need to test a plugin or theme with a large site, this may help you. The image of the instance was made with the Duplicator plugin. Download the zip file, unzip it, … Read more