From eca7fbfaec273f267f41025a94e8d825562bc8c7 Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Mon, 1 Jul 2013 18:18:34 +0530 Subject: [PATCH] Nginx Helper to Remove index.php from subdirectory network --- usr/local/sbin/easyengine | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/usr/local/sbin/easyengine b/usr/local/sbin/easyengine index 174101c6..7a55ddef 100755 --- a/usr/local/sbin/easyengine +++ b/usr/local/sbin/easyengine @@ -674,6 +674,14 @@ WPSUBDIRNETWORK() cd /var/www/$DOMAIN/htdocs || OwnError "Unable To Change Directory" wp core install-network --title="$SITETITLE" || OwnError "Unable To Setup WordPress SubDirectory Network" + # Remove index.php from http://$DOMAIN/wp-admin/options-permalink.php + + # Install Nginx Helper + wp plugin install nginx-helper || OwnError "Unable To Install Nginx Helper Plugin" + + # Activate Nginx Helper + wp plugin activate nginx-helper || OwnError "Unable To Activate Nginx Helper Plugin" + 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 } @@ -684,10 +692,14 @@ WPSUBDOMAINNETWORK() cd /var/www/$DOMAIN/htdocs || OwnError "Unable To Change Directory" wp core install-network --title="$SITETITLE" --subdomains || OwnError "Unable To Setup WordPress SubDirectory Network" - # Install Nginx Helper # Remove index.php from http://$DOMAIN/wp-admin/options-permalink.php + + # Install Nginx Helper wp plugin install nginx-helper || OwnError "Unable To Install Nginx Helper Plugin" + # Activate Nginx Helper + wp plugin activate nginx-helper || OwnError "Unable To Activate Nginx Helper Plugin" + 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 }