+ winter restore perms quick helper

* wordpress quick script moved into subfolder
This commit is contained in:
2025-01-14 08:27:01 +03:00
parent bac03305bd
commit ed6c2ee369
19 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,25 @@
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. "${SCRIPT_DIR}/settings.sh" || {
echo "no settings" && exit 1
}
wp core config --dbname=$PROJECT_NAME --dbuser=$PROJECT_NAME --dbpass=$PROJECT_NAME --dbhost=db --dbprefix=$TABLE_PREFIX
sed -i 's/<?php//' "${PROJECT_WEB_ROOT}/wp-config.php"
cat << \EOF | cat - "${PROJECT_WEB_ROOT}/wp-config.php" > /tmp/out && mv /tmp/out "${PROJECT_WEB_ROOT}/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