Parcourir la source

Adjust WP_HOME and WP_SITEURL on relocation

Girish Ramakrishnan il y a 9 ans
Parent
commit
20fcb1b940
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      start.sh

+ 2 - 0
start.sh

@@ -61,6 +61,8 @@ sed -e "s/define('DB_NAME',.*/define('DB_NAME', '${MYSQL_DATABASE}');/" \
     -e "s/define('DB_USER',.*/define('DB_USER', '${MYSQL_USERNAME}');/" \
     -e "s/define('DB_PASSWORD',.*/define('DB_PASSWORD', '${MYSQL_PASSWORD}');/" \
     -e "s/define('DB_HOST',.*/define('DB_HOST', '${MYSQL_HOST}');/" \
+    -e "s|define('WP_HOME',.*|define('WP_HOME', 'https://$(hostname -f)');|" \
+    -e "s|define('WP_SITEURL',.*|define('WP_SITEURL', 'https://$(hostname -f)');|" \
     -i /app/data/wp-config.php # sed -i seems to destroy symlink
 
 # reset the admin password