Update wp-fix-hacked.sh

This commit is contained in:
Pushkraj Jori 2025-07-07 11:59:23 +05:30 committed by GitHub
parent afcdae03c3
commit 5510d1a2e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,11 +33,12 @@ done

echo "📂 Cleaning WordPress install at: $ROOT_DIR"

# 1. Delete everything except wp-config.php & wp-content/
find "$ROOT_DIR" -mindepth 1 \
! -path "$ROOT_DIR/wp-config.php" \
! -path "$ROOT_DIR/wp-content/*" \
-exec rm -rf {} +
# todo: not safe need more work
# # 1. Delete everything except wp-config.php & wp-content/
# find "$ROOT_DIR" -mindepth 1 \
# ! -path "$ROOT_DIR/wp-config.php" \
# ! -path "$ROOT_DIR/wp-content/*" \
# -exec rm -rf {} +

# 2. Remove ELF binaries
echo " • Removing ELF binaries..."