Skip to content

Instantly share code, notes, and snippets.

View insanedefaults's full-sized avatar
Sailin' on by

Michael Anthony insanedefaults

Sailin' on by
View GitHub Profile
@insanedefaults
insanedefaults / checkup.sh
Last active July 8, 2017 03:12
Perform basic checks on a WordPress install with wp-cli
checkup() {
install=$(pwd | cut -d / -f 6)
environment=$(pwd | cut -d / -f 5)
echo "Install: ${install}" | egrep --color ".*"
#home and siteurl
wp db query "SELECT option_name, option_value FROM $(wp db tables | grep options) WHERE option_name='home' OR option_name='siteurl'"
echo
echo "Theme Information:" | egrep --color ".*"
wp theme status
@insanedefaults
insanedefaults / interconnectit.sh
Created February 13, 2015 01:11
Command line tool for use with Interconnectit's Search and Replace for WordPress
interconnectit() {
if [[ -z $1 ]] || [[ $1 == "help" ]]; then
echo "usage: interconnectit search_for replace_with your_email"
echo "Email is optional- if you provide it, an email will be sent to you once the search and replace finishes."
echo "Run this from the root of the WordPress you want the search and replace done on."
else
#acquire and prep search and replace script
wget https://github.com/interconnectit/Search-Replace-DB/archive/master.zip
unzip master.zip && rm master.zip