From fc59ec3ca39e5fea970f327d75fc96cb7b25eaab Mon Sep 17 00:00:00 2001 From: Jonathan Rosenbaum Date: Sun, 22 Jun 2025 20:19:26 +0000 Subject: [PATCH] Solves weird permission issues in wp-content. --- README.md | 2 +- wp-rocket-launch.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index be55558..7981255 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ If you want a **fully automated** upgrade, use the `wp-rocket-launch.sh` script: ✅ Automatically cleans up existing containers and volumes ✅ Builds the custom WordPress image ✅ Deploys the new version with minimal manual intervention -✅ Copies new installation files to production +✅ Copies new installation files to production and correct permissions ✅ Wordpress salt keys are shuffled Alternatively, follow the manual upgrade process below. diff --git a/wp-rocket-launch.sh b/wp-rocket-launch.sh index c0e900a..0addd67 100755 --- a/wp-rocket-launch.sh +++ b/wp-rocket-launch.sh @@ -40,8 +40,9 @@ else fi # Step 6: Copy new WordPress content after deployment -echo "📂 Copying new WordPress content to wp-content..." +echo "📂 Copying new WordPress content to wp-content and correct permissions..." docker compose exec wordpress_${COMPOSE_PROJECT_NAME} bash -c "cp -a /var/www/html/wp-content-new/* /var/www/html/wp-content/" +docker compose exec wordpress_${COMPOSE_PROJECT_NAME} bash -c "/usr/bin/find /var/www/html/wp-content -type d -exec chmod 755 {} \; -o -type f -exec chmod 644 {} \;" echo "✅ WordPress content successfully copied!" # Step 7: Shuffle salts