Removing Timthumb from a Custom Theme

Timthumb was a very popular php script for dynamically generating thumbnail images. That said it’s outdated and has performance issues when used with a modern web host like Kinsta. The following is a walkthrough showing the steps I took to remove Timthumb from a custom theme for one of my customers. Search for Timthumb…

WP Engine to Pantheon Migration

Recently I helped a customer move their site from WP Engine to Pantheon. Pantheon’s platform is quite different then WP Engine. During the process I wrote a script to automate the deployment process which allowed me to quickly resync the sites from a WP Engine backup to Pantheon. Prepare sftp with Rclone and Terminus…

Reset WordPress to Default

A common customer request I get is to reset a WordPress staging site back to its default state. I’ve done this manually quite a few times and decided I should just script it. The following bash script will drop all database tables, install a fresh copy of WordPress and remove all themes, plugins and…

Website Screenshots with Gowitness

There are many reasons why you might want to automate website screenshots. I’ve previously attempted to do this with development tools like PhantomJS and Selenium however was left unimpressed. Selenium is hard to setup and PhantomJS had difficulty getting accurate website screenshots. While searching for a better tool I discovered gowitness a command line…

Writing a Dispatch API Backend Server in Go

I first encountered the programming language Go back in 2015 while making a Github issue for Rclone. Since then I’ve used tools like Fathom, gowitness, Restic and Wpress-Extractor all written in Go. Learning Go has been on my todo list for a while now. During Christmas break 🎄- the span of 2 weeks –…

Long Running Scripts Over SSH with Kinsta

I recently discovered a hidden gem with Kinsta’s SSH environment. They have a built in option for performing a background process using the screen command. Huge thanks for this tip goes to Jeff, one of Kinsta’s support engineers 🙏. Two types of SSH disconnects with Kinsta The most common type of disconnect happens due to inactivity.…

The Art of Writing a Fully Self-contained Bash Script

Bash is amazingly powerful and yet not the easiest thing to learn. When learning any new computer language it’s natural to write everything in a very long single file. As you get better with the language you start to break things out into separate files as reusable modules. Bash is no different. One exception is…

WP-CLI Only WordPress

When it comes to unique use cases for WordPress, headless WordPress is all the talk. However earlier this year I stumbled upon another unique use case for WordPress. One I haven’t seen talked about before. That is a WP-CLI only WordPress. WordPress runs just fine without being web accessible. Under this configuration all interactions…

Email Subscriptions Powered by BNFW

Since the beginning of this blog I’ve relied on Jetpack Subscriptions to send out email notifications when publishing a blog post. It’s a free, quick and easy solution for handling blog email subscriptions. That said it’s not very flexible and emails are handled by the WordPress.com infrastructure which is not something you can control.…