WordPress CLI
Description:
As someone who is always messing up my WordPress site, I found a neat tool that can help me get my site back without messing with PHPMyAdmin. It’s called wp-cli and many people swear by it.
To Resolve:
-
First step is to download and install it:
1 2 3 4 5 6
sudo curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar sudo chmod +x wp-cli.phar sudo mv wp-cli.phar /usr/local/bin/wp # The following gets info on your install and makes sure it is working wp info wp cli update
-
Now for the real power! I can get my site back in a few commands:
1 2 3 4 5 6
wp search-replace 'example.dev' 'example.com' --skip-columns=guid # or wp option update home http://example.com wp option update siteurl http://example.com # if you want to see your current site URL, type: wp option get siteurl
Comments