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
26 lines
711 B
#!/bin/bash
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
cd "$SCRIPT_DIR/.."
|
|
|
|
NAME=wpstudio
|
|
wp core config --dbname=$NAME --dbuser=$NAME --dbpass=$NAME --dbhost=db
|
|
|
|
sed -i 's/<?php//' "$SCRIPT_DIR/../wp-config.php"
|
|
|
|
cat << \EOF | cat - "$SCRIPT_DIR/../wp-config.php" > /tmp/out && mv /tmp/out "$SCRIPT_DIR/../wp-config.php"
|
|
<?php
|
|
if (@$_SERVER['HTTP_HOST']) {
|
|
define('WP_SITEURL', 'http://'.$_SERVER['HTTP_HOST']);
|
|
define('WP_HOME', 'http://'.$_SERVER['HTTP_HOST']);
|
|
}
|
|
|
|
//if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'){
|
|
// $_SERVER['HTTPS'] = 'on';
|
|
// $_SERVER['SERVER_PORT'] = 443;
|
|
//}
|
|
|
|
define('FS_METHOD', 'direct');
|
|
EOF
|
|
|
|
$SCRIPT_DIR/deactivate-plugins-from-prod.sh
|