Description
We run a WordPress site using WooCommerce and LearnDash, hosted on an 8 vCPU VPS behind Cloudflare (Free plan). We get recurring 504 Gateway Timeout errors, especially during our marketing campaign windows. As a workaround, we've been turning on Cloudflare's "Under Attack Mode" during bad periods. This stops the 504s but breaks our own site's background processes (WP-Cron, WooCommerce Action Scheduler) — when we turn it off, a large backlog builds up and PHP workers hit their limit trying to catch up. This isn't sustainable, and it degrades the experience for real students logging into LearnDash courses and completing WooCommerce purchases. We've already confirmed one root cause (a fatal PHP error in a plugin, since fixed) and set up a Cloudflare Cache Rule for our top landing pages, but 504s are still happening. We believe there is more than one contributing cause. We need a developer to: Investigate our server logs (PHP-FPM, Apache/Nginx, WAF) to find the real root cause(s) of the 504s — is it bot/scanner traffic, our own campaign traffic, WordPress cron/background jobs, a specific plugin, or genuine server capacity limits? Set up proper server-level cron (replacing WordPress's visitor-triggered pseudo-cron) Recommend and implement caching/optimization so PHP workers stop hitting their limit, without needing "Under Attack Mode" as a workaround Advise on whether our current VPS is adequately sized, or whether the issue is configuration rather than capacity A full technical b