Mourning the loss of VIP Quickstart? A fan of VVV? Then I have something for you.
A few weeks ago, I wrote an article titled Post Meta Abuse, but I think some have misunderstood the problem at hand. Meta Queries are Bad? Searching for posts via post meta is bad, but grabbing post meta is not. For example, this is a hideously expensive/slow query: $args = array( ‘meta_key’ => ‘color’, ‘meta_value’ […]
I need to write a REST API endpoint, but lets assume we know nothing about REST APIs.
Varying Vagrant Vagrants ( VVV ) has undergone a small transformation for the better. This post will cover what’s changed and how to make sure your local developer environment isn’t left behind The New Provisioner The fabulous Lorelei Aurora has rewritten the provisioning system for VVV, enabling a slew of new features and improved speed/reliability, […]
What is the correct way to build a WordPress plugin, the official, recommended way that was always intended? The idealised standard? The Problem Plugins are not discrete modules in the WordPress world. Their isolation exists only on the filesystem, but once that code is loaded into memory it shares the same space as Core itself. […]
Functions and methods should return data structures, not rendered HTML. Returning HTML encourages early escaping, HTML parsing, and mixed data processing and output. These are all security and performance issues. What Could Go Wrong? Assembling and handling strings of HTML complicates things as you’re no longer dealing directly with the data, but a particular form […]
Post meta queries bring down databases, cripple traffic scaling, and dramatically inflate page load times. Thankfully there’s an almost trivial solution. Searching for Meta The problem comes when you need to query for post meta. This is a data design failure. Examples include: A meta key for posts that should appear on the homepage Marking a […]
Have you ever encountered this error? Timed out while waiting for the machine to boot. This means that Vagrant was unable to communicate with the guest machine within the configured (“config.vm.boot_timeout” value) time period. If you look above, you should be able to see the error(s) that Vagrant had when attempting to connect to the […]
Would you like to embed and run some PHP code in a blog post? Need to include a PHP file in a sidebar widget? Recently discovered this curious plugin? Don’t, you’re about to make an awful mistake. Lets walk through why it’s bad, and what you should be doing instead. Why Might Somebody Embed PHP? Perhaps you […]
Small scale imports are handy, but when sites get large you can run into problems. Normally people fall back to using SQL dumps, but doing this sidesteps hooks, and filters that could be important. Here are some tips on how to make WordPress imports and exports using WXR files easier. The First Major Problem When loading […]
- March 2017