Last active
July 8, 2017 03:12
-
-
Save insanedefaults/d2e6dbed41247ff4d769 to your computer and use it in GitHub Desktop.
Perform basic checks on a WordPress install with wp-cli
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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