Need to run a wp-cli command across a network of WordPress sites? Here is an example of how to add/update an option on every site on the network using wp-cli. wp site list –field=url | xargs -n1 -I % wp –url=% option update my_option my_value This is really two commands in one. Lets break them
Using wget to crawl your website
If you are looking to crawl your website for something like cache warming you can do so with wget quite easily. The following wget command will crawl a site and leave nothing behind on the local filesystem afterward. wget –mirror -q -e robots=off -p -r –delete-after -nd http://www.isleofmtv.com –mirror crawls the entire site -q prevents
Find and update WordPress posts with comments older than NNN days
I have a use case where I need to disable comments on posts in WordPress where the last comment was more than one year, or 365 days, ago. Posts can be found with this query: SELECT p.ID, p.post_title, p.post_date, p.comment_status, p.`ping_status` FROM wp_posts AS p WHERE p.ID IN ( SELECT c.comment_post_ID FROM wp_comments AS c
Quickly list all hosts in your ssh config
I try to be a good citizen and create unique ssh keys for each service I ssh into. I setup all sorts of fun config items and one of my favorites is host aliases. I have accumulated dozens of hosts in my config file and remembering the names of each can be problematic. I tend to
Mute and unmute your mic quickly with this Alfred Workflow
I am on a lot of calls for work every day and juggle several different call applications. Finding the apps mute/unmute button quickly gets tedious. On some apps the UI is so poorly designed as to make toggling the mic nearly unusable. Enter Alfred! Alfred is an amazing productivity app. Alfred let you run custom