Skip to content

Commit 3e04377

Browse files
committed
Merge pull request eugeneware#35 from ericandrewlewis/1
WordPress enables "pretty permalinks" by deafult as of version 4.2
2 parents 4fd497b + dac7c13 commit 3e04377

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

start.sh

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22
if [ ! -f /usr/share/nginx/www/wp-config.php ]; then
33
#mysql has to be started this way as it doesn't work to call from /etc/init.d
4-
/usr/bin/mysqld_safe &
4+
/usr/bin/mysqld_safe &
55
sleep 10s
66
# Here we generate random passwords (thank you pwgen!). The first two are for mysql users, the last batch for random keys in wp-config.php
77
WORDPRESS_DB="wordpress"
88
MYSQL_PASSWORD=`pwgen -c -n -1 12`
99
WORDPRESS_PASSWORD=`pwgen -c -n -1 12`
10-
#This is so the passwords show up in logs.
10+
#This is so the passwords show up in logs.
1111
echo mysql root password: $MYSQL_PASSWORD
1212
echo wordpress password: $WORDPRESS_PASSWORD
1313
echo $MYSQL_PASSWORD > /mysql-root-pw.txt
@@ -30,12 +30,11 @@ if [ ! -f /usr/share/nginx/www/wp-config.php ]; then
3030
unzip -o nginx-helper.*.zip -d /usr/share/nginx/www/wp-content/plugins
3131
chown -R www-data:www-data /usr/share/nginx/www/wp-content/plugins/nginx-helper
3232

33-
# Activate nginx plugin and set up pretty permalink structure once logged in
33+
# Activate nginx plugin once logged in
3434
cat << ENDL >> /usr/share/nginx/www/wp-config.php
3535
\$plugins = get_option( 'active_plugins' );
3636
if ( count( \$plugins ) === 0 ) {
3737
require_once(ABSPATH .'/wp-admin/includes/plugin.php');
38-
\$wp_rewrite->set_permalink_structure( '/%postname%/' );
3938
\$pluginsToActivate = array( 'nginx-helper/nginx-helper.php' );
4039
foreach ( \$pluginsToActivate as \$plugin ) {
4140
if ( !in_array( \$plugin, \$plugins ) ) {

0 commit comments

Comments
 (0)