WP – WP CLI – SSH

		
		
			

MOOSE PLUGINS DEV

BLUEHOST SSH INFO
Hostname: devhtmlfive.com
Username: devhtmlf
Password: marchK3y@mony5392

ssh devhtmlf@devhtmlfive.com

ssh devhtmlf@devhtmlfive.com ‘./moose2.sh’

alias c=’clear’
alias l=’ls -ltra’
alias msq=’/Applications/MAMP/Library/bin/mysql –host=localhost -uroot -proot’

CREATE DATABASE moose_plugin_db;
show databases;

DROP DATABASE moose_plugin_db;

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
wp –version
wp –info
wp core version
wp core download

wp core config –dbname=moosedev_plugin_db –dbuser=root –dbpass=root –dbhost=localhost
wp db create

wp core config –dbname=devhtmlf_firefly_CLI_db –dbuser=devhtmlf_wpadmin –dbpass=Keya5392 –dbhost=localhost

vim .bash_profile
export PATH=”/Applications/MAMP/bin/php/php7.0.0/bin:$PATH”

wp core install –url=example.com –title=Example –admin_user=supervisor –admin_email=info@example.com –prompt=admin_password < admin_password.txt

wp core install –url=plugin.local –title=Moose-Plugin-Dev-Site –admin_user=imbteam –admin_email=wecare@inspiredmommyboss.com –admin_password=imbteam wp core version wp core version –extra PLUGINS: wp plugin list wp plugin list –update=available wp plugin list –update=available –fields=name,version wp plugin install “Post Duplicator” wp plugin activate post-duplicator wp plugin deactivate post-duplicator wp plugin uninstall hello wp plugin update –all OR wp plugin update [plugin name] wp plugin list | grep post | awk ‘{print $1}’ DB BACKUP: wp db export /Users/shourav/Documents/_PLUGIN/_backups/example.sql WP UPDATE: wp core update wp core update-db wp core verify-checksums ============================== Unix Stuff: devhtmlf@devhtmlfive.com [~/public_html/angie]# wp plugin list | grep simple simple-page-ordering active none 2.2.4 devhtmlf@devhtmlfive.com [~/public_html/angie]# wp plugin list | grep simple | awk ‘{print $1}’ simple-page-ordering devhtmlf@devhtmlfive.com [~/public_html/angie]# wp plugin list | grep simple | awk ‘{print $1}’ | awk -F “-” ‘{print $2}’ page while true > do
> date
> sleep 2
> done

==============================

PHP & WP CLI

wp eval ‘echo get_option(“siteurl”).”\n”;’

==============================

BACKUP ALL WP FILES:

tar -vczf backup.gz .

ADD RSA KEY TO MAC KEY CHAIN

ssh-add -K ~/.ssh/id_rsa

**After any major automatic OS update you will have to do this again and again. If issue persists, just run the command above right before running wordmove.

 

SSH CONFIG FILE

Host *

        ServerAliveInterval 10

        ControlMaster auto

        ControlPersist yes

        UseRoaming no

        UseKeychain yes