From 9509325d8dd525d0528aaee94d464f6f29e6439e Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Thu, 20 Jun 2013 18:11:49 +0530 Subject: [PATCH] WordPress Network Setup Function Created --- usr/local/sbin/easyengine | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/usr/local/sbin/easyengine b/usr/local/sbin/easyengine index a2225459..7d6ed1b0 100755 --- a/usr/local/sbin/easyengine +++ b/usr/local/sbin/easyengine @@ -659,6 +659,26 @@ FASTCGINGINX() echo -e "\033[34m W3 Total Cache: http://$DOMAIN/wp-admin/admin.php?page=w3tc_general \e[0m" } +# Setup Wordpress Network +WPSUBDIRNETWORK() +{ + # Prepare wp-config.php File Foe Wordpress Multisite With SubDirectory + cd /var/www/$DOMAIN/htdocs || OwnError "Unable To Change Directory" + wp core install-network --title="$SITETITLE" || OwnError "Unable To Setup WordPress SubDirectory Network" + + sed -i "/WP_DEBUG/a \define('WP_ALLOW_MULTISITE', true);" /var/www/$DOMAIN/wp-config.php + sed -i "/WP_ALLOW_MULTISITE/a \define('WPMU_ACCEL_REDIRECT', true);" /var/www/$DOMAIN/wp-config.php +} + +WPSUBDOMAINNETWORK() +{ + # Prepare wp-config.php File Foe Wordpress Multisite With SubDirectory + cd /var/www/$DOMAIN/htdocs || OwnError "Unable To Change Directory" + wp core install-network --title="$SITETITLE" --subdomains || OwnError "Unable To Setup WordPress SubDirectory Network" + + sed -i "/WP_DEBUG/a \define('WP_ALLOW_MULTISITE', true);" /var/www/$DOMAIN/wp-config.php + sed -i "/WP_ALLOW_MULTISITE/a \define('WPMU_ACCEL_REDIRECT', true);" /var/www/$DOMAIN/wp-config.php +} @@ -1218,9 +1238,8 @@ then # Setup Basic Nginx BASICNGINX - # Prepare wp-config.php File Foe Wordpress Multisite With SubDirectory - cd /var/www/$DOMAIN/htdocs || OwnError "Unable To Change Directory" - wp core install-network --title="$SITETITLE" || OwnError "Unable To Setup WordPress SubDirectory Network" + # Setup WordPress Network + WPSUBDIRNETWORK # Display Success Message echo