Skip to content

Instantly share code, notes, and snippets.

😆
My brain hurts!

Luke Cavanagh lukecav

😆
My brain hurts!
Block or report user

Report or block lukecav

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lukecav
lukecav / Command
Created Jul 2, 2019
WooCommerce Admin plugin deactivate using WP-CLI
View Command
wp plugin deactivate woocommerce-admin --uninstall
@lukecav
lukecav / Links
Last active Jul 1, 2019
Snipcart with WordPress
View Links
@lukecav
lukecav / Link
Created Jun 28, 2019
How to check MySQL database size in Linux
View Link
@lukecav
lukecav / Links
Created Jun 28, 2019
Migrate from SendGrid to Postmark
View Links
@lukecav
lukecav / Command
Created Jun 28, 2019
Remove “Uncategorized” from Posts with More than One Category using WP-CLI
View Command
for post in $(wp post list --field=ID); do count=$(wp post term list $post 'category' --fields='name' --format="count"); if [ "$count" -gt "1" ]; then wp post term remove $post category 'uncategorized'; fi; done
@lukecav
lukecav / functions.php
Created Jun 28, 2019
Globally disable Akismet integration with Gravity Forms
View functions.php
add_filter( 'gform_akismet_enabled', '__return_false' );
@lukecav
lukecav / Commands
Created Jun 28, 2019
Remove Tags that Appear in Less than 100 Posts using WP-CLI
View Commands
for x in $(wp term list post_tag --format=ids) ; do count_posts=$(wp rest post list --tags=$x | wc -l | awk '{print $1-1}'); if [ $count_posts -lt 100 ]; then wp term delete post_tag $x; fi; done
@lukecav
lukecav / Commands
Created Jun 28, 2019
wp term command in WP-CLI
View Commands
wp term create
wp term delete
wp term generate
wp term get
wp term list
wp term meta
wp term recount
wp term update
wp term meta add
@lukecav
lukecav / Link
Created Jun 27, 2019
Fixing Jetpack Connection Issues
View Link
@lukecav
lukecav / Links
Created Jun 27, 2019
Amazon S3 Transfer Acceleration
View Links
You can’t perform that action at this time.