Category: WordPress
-
Getting WordPress Database Size via WP-CLI
One WP-CLI command that I’ve found handy is this db-size command. It allows you to output a site’s registered database tables along with the data and index size in any format that WP-CLI natively supports, with multiple sort options: Here’s some example output from one of my test sites: Enjoy!
-
Quick Tip: Export WordPress SQL output via WP-CLI
If for some reason you can’t run wp db query, but need to export SQL output to a CSV or other file, then have a look at this small WP-CLI command I whipped up that should allow this: I’d add an example here, but I don’t have any right now that I can share 😐…
-
Half-Baked Plugins: Embeds for Twitch and Gutenberg
In my forever attempt to learn and understand Gutenberg, React, and ES6 (which I am failing at horribly) I sometimes build WordPress plugins just for the learning experience. I don’t have any full intent on releasing these to the WordPress.org Plugin Repository because I honestly don’t feel like dealing with end users and support. I’m…
-
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…
-
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…
-
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…