Add Fast 500 Error Tracker + Fix awk error in analyzer

NEW SCRIPT: modules/website/500-error-tracker.sh
- FAST-ONLY 500 error detection (no menus, no options)
- Scans access logs for 500 errors
- Maps domains to cPanel usernames
- Automatically diagnoses root causes by checking error_log files
- Shows actual PHP errors causing the 500s

ROOT CAUSE DETECTION:
- PHP Memory Exhausted (shows current limit)
- PHP Fatal Errors
- PHP Syntax Errors
- Missing PHP Functions/Extensions
- Database Connection Failures
- .htaccess Issues
- Shows ACTUAL error examples, not just suggestions

FIXES:
- Fixed awk error in website-error-analyzer.sh:
  • Changed "next" in END block to "if (length > 0)"
  • "next" cannot be used in END block in awk

- Added option 2 in Website Management menu
- Renumbered all WordPress tools (3-16)

DIFFERENCE FROM FULL ANALYZER:
Full Analyzer: All errors, filters, time ranges, user choices
Fast Tracker: ONLY 500s, auto-diagnosis, shows WHY not suggestions

Use Fast Tracker when you need to quickly find which domains
are getting 500 errors and the exact PHP errors causing them.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
cschantz
2025-11-03 20:32:19 -05:00
parent 60cdad8e7b
commit b77e8bb9dd
3 changed files with 278 additions and 31 deletions
+30 -28
View File
@@ -435,23 +435,24 @@ show_wordpress_menu() {
echo -e "${BOLD}General Website Tools:${NC}"
echo ""
echo -e " ${BLUE}1)${NC} 🔍 Website Error Analyzer - Find 500/config errors (filters bots)"
echo -e " ${RED}2)${NC} 🔥 Fast 500 Error Tracker - ONLY 500s + root cause diagnosis"
echo ""
echo -e "${BOLD}WordPress Tools:${NC}"
echo ""
echo -e " ${BLUE}2)${NC} Health Check (All Sites) - Scan all WP installations"
echo -e " ${BLUE}3)${NC} WP-Cron Status - Check cron job status"
echo -e " ${BLUE}4)${NC} WP-Cron Mass Fix - Fix/enable cron on all sites"
echo -e " ${BLUE}5)${NC} WP-Cron Mass Create - Setup proper system crons"
echo -e " ${BLUE}6)${NC} Plugin Audit - Security scan of plugins"
echo -e " ${BLUE}7)${NC} Theme Audit - Security scan of themes"
echo -e " ${BLUE}8)${NC} Database Optimizer - Clean/optimize WP databases"
echo -e " ${BLUE}9)${NC} Cache Clear (All Sites) - Clear all WP caches"
echo -e " ${BLUE}10)${NC} Mass Update Core - Update WordPress core (all)"
echo -e " ${BLUE}11)${NC} Mass Update Plugins - Update plugins (all sites)"
echo -e " ${BLUE}12)${NC} Login Security Audit - Check for weak passwords"
echo -e " ${BLUE}13)${NC} Malware Scanner - Scan for infected files"
echo -e " ${BLUE}14)${NC} Permission Fixer - Fix file permissions"
echo -e " ${BLUE}15)${NC} Debug Log Analyzer - Parse WP debug logs"
echo -e " ${BLUE}3)${NC} Health Check (All Sites) - Scan all WP installations"
echo -e " ${BLUE}4)${NC} WP-Cron Status - Check cron job status"
echo -e " ${BLUE}5)${NC} WP-Cron Mass Fix - Fix/enable cron on all sites"
echo -e " ${BLUE}6)${NC} WP-Cron Mass Create - Setup proper system crons"
echo -e " ${BLUE}7)${NC} Plugin Audit - Security scan of plugins"
echo -e " ${BLUE}8)${NC} Theme Audit - Security scan of themes"
echo -e " ${BLUE}9)${NC} Database Optimizer - Clean/optimize WP databases"
echo -e " ${BLUE}10)${NC} Cache Clear (All Sites) - Clear all WP caches"
echo -e " ${BLUE}11)${NC} Mass Update Core - Update WordPress core (all)"
echo -e " ${BLUE}12)${NC} Mass Update Plugins - Update plugins (all sites)"
echo -e " ${BLUE}13)${NC} Login Security Audit - Check for weak passwords"
echo -e " ${BLUE}14)${NC} Malware Scanner - Scan for infected files"
echo -e " ${BLUE}15)${NC} Permission Fixer - Fix file permissions"
echo -e " ${BLUE}16)${NC} Debug Log Analyzer - Parse WP debug logs"
echo ""
echo -e " ${RED}0)${NC} Back to Main Menu"
echo ""
@@ -1148,20 +1149,21 @@ handle_wordpress_menu() {
case $choice in
1) run_module "website" "website-error-analyzer.sh" ;;
2) run_module "wordpress" "wp-health-check.sh" ;;
3) run_module "wordpress" "wp-cron-status.sh" ;;
4) run_module "wordpress" "wp-cron-mass-fix.sh" ;;
5) run_module "wordpress" "wp-cron-mass-create.sh" ;;
6) run_module "wordpress" "wp-plugin-audit.sh" ;;
7) run_module "wordpress" "wp-theme-audit.sh" ;;
8) run_module "wordpress" "wp-db-optimizer.sh" ;;
9) run_module "wordpress" "wp-cache-clear.sh" ;;
10) run_module "wordpress" "wp-mass-update-core.sh" ;;
11) run_module "wordpress" "wp-mass-update-plugins.sh" ;;
12) run_module "wordpress" "wp-login-security.sh" ;;
13) run_module "wordpress" "wp-malware-scanner.sh" ;;
14) run_module "wordpress" "wp-permission-fixer.sh" ;;
15) run_module "wordpress" "wp-debug-log-analyzer.sh" ;;
2) run_module "website" "500-error-tracker.sh" ;;
3) run_module "wordpress" "wp-health-check.sh" ;;
4) run_module "wordpress" "wp-cron-status.sh" ;;
5) run_module "wordpress" "wp-cron-mass-fix.sh" ;;
6) run_module "wordpress" "wp-cron-mass-create.sh" ;;
7) run_module "wordpress" "wp-plugin-audit.sh" ;;
8) run_module "wordpress" "wp-theme-audit.sh" ;;
9) run_module "wordpress" "wp-db-optimizer.sh" ;;
10) run_module "wordpress" "wp-cache-clear.sh" ;;
11) run_module "wordpress" "wp-mass-update-core.sh" ;;
12) run_module "wordpress" "wp-mass-update-plugins.sh" ;;
13) run_module "wordpress" "wp-login-security.sh" ;;
14) run_module "wordpress" "wp-malware-scanner.sh" ;;
15) run_module "wordpress" "wp-permission-fixer.sh" ;;
16) run_module "wordpress" "wp-debug-log-analyzer.sh" ;;
0) return ;;
*) echo -e "${RED}Invalid option${NC}"; sleep 1 ;;
esac