diff --git a/modules/website/wordpress/wordpress-cron-manager.sh b/modules/website/wordpress/wordpress-cron-manager.sh index 6e8ca05..7d63acc 100755 --- a/modules/website/wordpress/wordpress-cron-manager.sh +++ b/modules/website/wordpress/wordpress-cron-manager.sh @@ -399,13 +399,14 @@ initialize_wp_cache() { echo "[INFO] Scanning for WordPress installations (building cache)..." >&2 # Run the discovery and save to temp file for persistence - WP_SITES_CACHE=$(get_wp_search_paths "$panel") + # 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) echo "$WP_SITES_CACHE" > "$WP_CACHE_FILE" 2>/dev/null WP_CACHE_INITIALIZED=1 # Report count to help diagnose missed installs local site_count - site_count=$(echo "$WP_SITES_CACHE" | grep -c "wp-config" 2>/dev/null || echo 0) + site_count=$(echo "$WP_SITES_CACHE" | wc -l 2>/dev/null) echo "[INFO] Found $site_count WordPress installation(s). Cache saved (valid 1 hour)." >&2 }