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

Counter

Here’s a way to put a counter that updates once a second in a page. It’s based on the time. This isn’t some earth-shattering discovery, it’s trival. But somebody asked me. 123 is the count now!

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

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