From 07f13fae38523e8ee4cb3637dbc49f1dc00383e3 Mon Sep 17 00:00:00 2001 From: RomanNum3ral Date: Thu, 29 May 2025 20:04:11 +0000 Subject: [PATCH] Update updated_install2.sh --- updated_install2.sh | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/updated_install2.sh b/updated_install2.sh index 6f3548d..4635066 100644 --- a/updated_install2.sh +++ b/updated_install2.sh @@ -2,21 +2,8 @@ # ====== CONFIGURATION ====== DB_PASSWORD="changeme123" # <- Set your database password here -# ============================ -# Create wp-config.php from the sample -sudo -u www-data cp /srv/www/wordpress/wp-config-sample.php /srv/www/wordpress/wp-config.php - -# Replace database settings -sudo -u www-data sed -i 's/database_name_here/wordpress/' /srv/www/wordpress/wp-config.php -sudo -u www-data sed -i 's/username_here/wordpress/' /srv/www/wordpress/wp-config.php -sudo -u www-data sed -i "s/password_here/${DB_PASSWORD}/" /srv/www/wordpress/wp-config.php - -# Path to config -WP_CONFIG="/srv/www/wordpress/wp-config.php" - -# Delete existing placeholder salts -sed -i "/AUTH_KEY/d;/SECURE_AUTH_KEY/d;/LOGGED_IN_KEY/d;/NONCE_KEY/d;/AUTH_SALT/d;/SECURE_AUTH_SALT/d;/LOGGED_IN_SALT/d;/NONCE_SALT/d" "$WP_CONFIG" - -# Fetch and append new salts from the WordPress API -curl -s https://api.wordpress.org/secret-key/1.1/salt/ >> "$WP_CONFIG" +rsync -avP /tmp/wordpress/ /var/www/html/ +chown -R www-data:www-data /var/www/html/ +chmod -R 755 /var/www/html/ +rm index.html \ No newline at end of file