Categories
WordPress

Deleting Old Post Revisions in WordPress with WP-CLI

Recently I’ve been working with a client who’s site we’re going to soon be migrating. To help with any downtime, we’ve been looking at reducing their database size, which is something around 50-60 gigabytes. After looking through the database, one easy win would be to purge as many post revisions as possible, since their wp_posts […]

Categories
Uncategorized

Five Years

This past Monday marked my five year anniversary at Automattic, working for WordPress VIP. It seems forever ago, but at 9:59AM on February 11, 2015 I emailed jobs@automattic.com with my resume built as a child theme to twentyfifteen. Somehow I must have tricked them because 22 days later (which is pretty fast for a reply […]

Categories
Plague Inc. IRL

Day 1

Other than the children being home, all is normal. It’s like a day off school, except they have “e-learning” they’re refusing to do. My mouse wheel broke, so I ordered a new mouse. So far, we are doing well.

Categories
MacOS

Quick Tip: HyperDock as a Service

HyperDock, a macOS tool that provides windows previews like modern versions of Windows, seems to have problems on macOS Catalina for me. At random times, it will stop working and I need to go to System Preferences and disable and re-enable it; sometimes many times a day. I’ve tried contacting the author and so far […]

Categories
WordPress

Wisps, a WordPress Plugin

With Wisps, you can have code snippets similar to Gist, Pastebin, or similar code sharing sites. Using the built-in WordPress code editor, you can write snippets to post and share.

Categories
Dev Stuff

Open source ngrok alternative

During a client onsite last year, I was first introduced to ngrok. Ngrok provides “secure introspectable tunnels to localhost.” The free tier of ngrok provides temporary, random subdomains to use. This is fine most of the time, but kind of causes problems for things like Jetpack that require persistent domain names for connecting. While I […]

Categories
WordPress

Debugging WordPress Hooks: Speed

If you google debugging WordPress hooks you’ll find a lot of information. About 1,180,000 results Let’s add another one. WordPress hooks are powerful, but also complex under the hood. There’s plenty of topics I could talk about here, but right now I’m only going to talk about speed. How long does it take for a […]

Categories
WordPress

Finding Duplicate WordPress Post Meta

Have you ever accidentally saved the same post meta to a post in WordPress, and ended up with a duplicate? Of course, you could go through each post and check the meta, check for duplicates, and delete any of them but… I think I’ve figured out a beast of an SQL query that will give […]

Categories
WordPress

WordPress Post Meta and JSON

…or how I stopped worrying and learned to love the slashes. Post Meta in WordPress is a great tool to store random bits of data associated with your posts. But did you know that it comes with its own set of problems? Have you ever tried storing a JSON string inside of post meta? Only […]

Categories
WordPress

Better Caching in WordPress

Caching data in WordPress is easy. Caching data in WordPress in a good and performant way takes a bit more work. For instance, many developers commonly use the Transients API to cache data. As the lowest common denominator in caching, this is okay. It’ll get the job done, even on a $10/year shared hosting plan. But what […]