Using WP-CLI for Batch Updating Contact Form 7 Postmeta Options

I recently set up Mailgun for a Codeable client who was using Contact Form 7. Unfortunately after integrating Mailgun to improve the reliability of email delivery, the formatting of the emails was not quite right. I managed to isolate the issue to a setting called Use HTML Content Type in Contact Form 7 which had … Learn more…

Check WordPress wp-cron Count with WP-CLI + Monit + Email Alerts

Monit is a very flexible Monitoring tool to help ensure your services are always running. It can be used to send email alerts (guide with Mailgun) when processes crash and automatically restart them. On all the VPS and dedicated servers I set up for my clients on Codeable, I configure Monit for proactive monitoring. wp-cron … Learn more…

Automatically Delete Expired WordPress Transients using WP-CLI

WordPress plugins and themes can store a lot of temporary data known as transients. By default these transients are stored in the wp_options table and can accumulate rather quickly. Recently on codeable I cleaned a site with 58000 expired transients that were causing the database to crash daily. Due to an idiosyncrasy in WordPress core, … Learn more…

Batch Lossy Compress PNG with pngquant Linux Command Line

Image optimization is critical for high performing websites. The smaller your images are the less space they take up which is great for desktop and mobile users. Lossy compression yields smaller file sizes than lossless compression. Lossy Compression of PNGs can be done with pngquant hosted on github. This guide will show you how to batch … Learn more…