Files
Linux-Server-Management-Too…/modules/website
cschantz d092f656d1 Fix domain lookup in WordPress Cron Manager
The domain lookup was failing because it only searched for 'servername:' in /var/cpanel/userdata/*/main files, but cPanel stores domain information differently:

- main files use 'main_domain: domain.com' (YAML format)
- domain-specific files use 'servername: domain.com' (YAML format)

Changes:
• Added two-step domain lookup process
• Method 1: Check main_domain in /var/cpanel/userdata/*/main files
• Method 2: Fallback to search all domain files for servername
• Skip cache files (.cache, cache, cache.json) during search
• Applied fix to all three domain lookup locations (options 2, 5, 6)

This fixes the "WordPress installation not found for domain" error that occurred when domains weren't configured as main_domain.

Tested with pickledperil.com - lookup now works correctly.
2025-11-10 20:41:13 -05:00
..