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.

22 lines
567 B

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