Browse Source

Nginx Helper to Remove index.php from subdirectory network

old-stable
Mitesh Shah 12 years ago
parent
commit
eca7fbfaec
  1. 14
      usr/local/sbin/easyengine

14
usr/local/sbin/easyengine

@ -674,6 +674,14 @@ WPSUBDIRNETWORK()
cd /var/www/$DOMAIN/htdocs || OwnError "Unable To Change Directory" cd /var/www/$DOMAIN/htdocs || OwnError "Unable To Change Directory"
wp core install-network --title="$SITETITLE" || OwnError "Unable To Setup WordPress SubDirectory Network" 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_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 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" cd /var/www/$DOMAIN/htdocs || OwnError "Unable To Change Directory"
wp core install-network --title="$SITETITLE" --subdomains || OwnError "Unable To Setup WordPress SubDirectory Network" 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 # 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" 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_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 sed -i "/WP_ALLOW_MULTISITE/a \define('WPMU_ACCEL_REDIRECT', true);" /var/www/$DOMAIN/wp-config.php
} }

Loading…
Cancel
Save