Install WP-CLI during setup
This commit is contained in:
29
install.sh
29
install.sh
@@ -884,6 +884,33 @@ install_composer() {
|
||||
log "Composer installed"
|
||||
}
|
||||
|
||||
# Install WP-CLI
|
||||
install_wp_cli() {
|
||||
header "Installing WP-CLI"
|
||||
|
||||
if command -v wp &>/dev/null; then
|
||||
log "WP-CLI already installed"
|
||||
return
|
||||
fi
|
||||
|
||||
local wp_url="https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar"
|
||||
local wp_path="/usr/local/bin/wp"
|
||||
|
||||
if ! curl -fsSL "$wp_url" -o "$wp_path"; then
|
||||
warn "Failed to download WP-CLI"
|
||||
return
|
||||
fi
|
||||
|
||||
chmod +x "$wp_path"
|
||||
|
||||
if ! command -v wp &>/dev/null; then
|
||||
warn "WP-CLI installed but not found on PATH"
|
||||
return
|
||||
fi
|
||||
|
||||
log "WP-CLI installed successfully"
|
||||
}
|
||||
|
||||
# Clone Jabali Panel
|
||||
clone_jabali() {
|
||||
header "Installing Jabali Panel"
|
||||
@@ -3300,6 +3327,7 @@ uninstall() {
|
||||
rm -rf /var/run/jabali
|
||||
rm -rf /var/log/jabali
|
||||
rm -rf /var/backups/jabali
|
||||
rm -f /usr/local/bin/wp
|
||||
rm -f /root/.jabali_db_credentials
|
||||
rm -f /root/.jabali_redis_credentials
|
||||
log "Jabali Panel removed"
|
||||
@@ -3581,6 +3609,7 @@ main() {
|
||||
configure_sysstat
|
||||
install_geoipupdate_binary
|
||||
install_composer
|
||||
install_wp_cli
|
||||
clone_jabali
|
||||
configure_php
|
||||
configure_mariadb
|
||||
|
||||
Reference in New Issue
Block a user