Skip to content

Instantly share code, notes, and snippets.

@insanedefaults
Last active July 8, 2017 03:12
Show Gist options
  • Save insanedefaults/d2e6dbed41247ff4d769 to your computer and use it in GitHub Desktop.
Save insanedefaults/d2e6dbed41247ff4d769 to your computer and use it in GitHub Desktop.
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
echo
echo "Plugin Information:" | egrep --color ".*"
wp plugin status
echo
echo "Cron system status:" | egrep --color ".*"
wp cron test
echo
echo "Multisite Information:" | egrep --color ".*"
wp site list --fields=blog_id,url
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment