From 62acdf637c0a237745fb7aa3324821a375966a8c Mon Sep 17 00:00:00 2001 From: gau1991 Date: Thu, 13 Nov 2014 16:44:34 +0530 Subject: [PATCH] Added WordPress plugin installation during ee site migrate --- bin/easyengine | 5 ++++- src/modules/site/create/ee_mod_plugin_settings.sh | 3 ++- src/modules/site/migrate/ee_mod_migrate_setup.sh | 12 ++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/bin/easyengine b/bin/easyengine index 96ac4f02..b838026e 100644 --- a/bin/easyengine +++ b/bin/easyengine @@ -782,7 +782,10 @@ elif [ "$EE_FIRST" = "site" ]; then # Setup migration ee_mod_migrate_setup - # Setup site + # Display WordPress cache plugin settings + ee_mod_plugin_settings + + # Successfully message ee_lib_echo_info "Successfully migrated site $EE_DOMAIN" else diff --git a/src/modules/site/create/ee_mod_plugin_settings.sh b/src/modules/site/create/ee_mod_plugin_settings.sh index e59347be..2d6612f0 100644 --- a/src/modules/site/create/ee_mod_plugin_settings.sh +++ b/src/modules/site/create/ee_mod_plugin_settings.sh @@ -1,6 +1,7 @@ # Display WordPress cache plugin settings -function ee_mod_plugin_settings() { +function ee_mod_plugin_settings() +{ if [ "$EE_SITE_CACHE_OPTION" = "--wpsc" ]; then if [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then ee_lib_echo_escape "Configure WPSC:\t\thttp://$EE_DOMAIN/wp-admin/network/settings.php?page=wpsupercache" diff --git a/src/modules/site/migrate/ee_mod_migrate_setup.sh b/src/modules/site/migrate/ee_mod_migrate_setup.sh index 523da3f6..d35fed30 100644 --- a/src/modules/site/migrate/ee_mod_migrate_setup.sh +++ b/src/modules/site/migrate/ee_mod_migrate_setup.sh @@ -26,6 +26,18 @@ function ee_mod_migrate_setup() pv $EE_MYSQL_PATH | mysql $EE_DB_NAME \ || ee_lib_error "Unable to import database, exit status = " $? fi + + # Install WordPress plugins + ee_mod_plugin_nginx_helper + + if [ "$EE_SITE_CACHE_OPTION" = "--wpsc" ]; then + ee_mod_plugin_wpsc + fi + + if [ "$EE_SITE_CACHE_OPTION" = "--w3tc" ] || [ "$EE_SITE_CACHE_OPTION" = "--wpfc" ]; then + ee_mod_plugin_w3tc + fi + fi # Setup database for MySQL site