diff --git a/modules/website/wordpress/wordpress-cron-manager.sh b/modules/website/wordpress/wordpress-cron-manager.sh index 7d63acc..e37e1fa 100755 --- a/modules/website/wordpress/wordpress-cron-manager.sh +++ b/modules/website/wordpress/wordpress-cron-manager.sh @@ -399,8 +399,13 @@ initialize_wp_cache() { echo "[INFO] Scanning for WordPress installations (building cache)..." >&2 # Run the discovery and save to temp file for persistence - # CRITICAL: Suppress all output from get_wp_search_paths to avoid capturing debug messages - WP_SITES_CACHE=$(get_wp_search_paths "$panel" 2>/dev/null) + # CRITICAL: Suppress stdout noise from system detection by redirecting to temp, then extracting only paths + local temp_discovery=$(mktemp) + get_wp_search_paths "$panel" > "$temp_discovery" 2>/dev/null + # Extract only lines that are actual file paths (contain /home or /var, start with /) + WP_SITES_CACHE=$(grep -E "^/.*wp-config\.php$" "$temp_discovery" 2>/dev/null || echo "") + rm -f "$temp_discovery" + echo "$WP_SITES_CACHE" > "$WP_CACHE_FILE" 2>/dev/null WP_CACHE_INITIALIZED=1