From 545041cc4b1f849affbcdc27db8bd033e9880361 Mon Sep 17 00:00:00 2001 From: qtwrk Date: Tue, 11 Feb 2020 17:27:11 +0100 Subject: [PATCH] add wp cli check/install --- CPScripts/EasyEngine/EasyEngine-migration.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CPScripts/EasyEngine/EasyEngine-migration.sh b/CPScripts/EasyEngine/EasyEngine-migration.sh index d807447ca..81357b083 100644 --- a/CPScripts/EasyEngine/EasyEngine-migration.sh +++ b/CPScripts/EasyEngine/EasyEngine-migration.sh @@ -329,8 +329,16 @@ fi install_lscwp() { ssh_v="ssh -o StrictHostKeyChecking=no root@$server_ip -p$server_port -i /root/.ssh/cyberpanel_migration_key" + +$ssh_v "ls -l /usr/bin/wp" +if [[ $? != "0" ]] ; then + $ssh_v "$sudoer wget -O /usr/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar" + $ssh_v "$sudoer chmod +x /usr/bin/wp" +fi +#install WP CLI if not yet installed. $ssh_v "sudo -u $owner_user -i -- wp --path=/home/${domains[$i]}/public_html plugin install litespeed-cache" echo -e "\nInstalling LiteSpeed Cache for WordPress..." + } export_database() {