You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
711 B

  1. #!/bin/bash
  2. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  3. cd "$SCRIPT_DIR/.."
  4. NAME=wpstudio
  5. wp core config --dbname=$NAME --dbuser=$NAME --dbpass=$NAME --dbhost=db
  6. sed -i 's/<?php//' "$SCRIPT_DIR/../wp-config.php"
  7. cat << \EOF | cat - "$SCRIPT_DIR/../wp-config.php" > /tmp/out && mv /tmp/out "$SCRIPT_DIR/../wp-config.php"
  8. <?php
  9. if (@$_SERVER['HTTP_HOST']) {
  10. define('WP_SITEURL', 'http://'.$_SERVER['HTTP_HOST']);
  11. define('WP_HOME', 'http://'.$_SERVER['HTTP_HOST']);
  12. }
  13. //if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'){
  14. // $_SERVER['HTTPS'] = 'on';
  15. // $_SERVER['SERVER_PORT'] = 443;
  16. //}
  17. define('FS_METHOD', 'direct');
  18. EOF
  19. $SCRIPT_DIR/deactivate-plugins-from-prod.sh