How to Fix the 504 Gateway Timeout Error in WooCommerce (UK Guide)

17 August 2026

Learn how to fix the 504 Gateway Timeout error in WooCommerce with UK-specific hosting advice, plugin checks, and server tweaks.

What Causes a 504 Error in WooCommerce?

A 504 Gateway Timeout error means your server (often the web server or a proxy like Cloudflare) waited too long for a response from an upstream server. In WooCommerce, this typically happens during high-traffic moments, while processing payments, or when a plugin makes a heavy request. For UK store owners, it often surfaces after a flash sale or when using resource-hungry plugins. The root cause can be a slow PHP process, a misconfigured server, or an external service timing out. Identifying the exact trigger is the first step – check your server error logs or ask your host to review them. In many cases, the issue is fixable without needing a developer.

Quick UK-Focused Hosting Checks

Before you dive into code, do a few quick checks. First, see if other sites on the same hosting server are down – sites like Downdetector can help, but for UK-specific hosts like 20i, Krystal, or Heart Internet, check their status pages directly. Next, test your site from different UK locations using a tool like UptimeRobot or GTmetrix. If the error only appears intermittently, it may be a resource limit. Contact your host's UK-based support team (they're usually quick) and ask if there's been any server load or if they've deployed a firewall rule that could be blocking requests. Sometimes a simple restart of your server or cache via your hosting dashboard clears it.

Plugin and Theme Conflicts

WooCommerce relies on many hooks, and a poorly coded plugin can cause the server to stall. To rule this out, temporarily deactivate all plugins except WooCommerce and see if the error disappears. If it does, reactivate them one by one. Pay special attention to caching plugins, security plugins, and payment gateways – these are common culprits. Also, switch to a default theme like Storefront or Twenty Twenty-Four to rule out theme conflicts. Remember to clear your UK-based CDN or caching layer (like WP Rocket or Cloudflare) after making changes. If you can't access the dashboard, use FTP or your hosting file manager to rename the plugins folder.

Increase PHP Memory and Timeout Limits

A 504 error can be caused by PHP scripts hitting their memory or execution time limits. For WooCommerce, we recommend a memory limit of at least 256MB. You can increase this by editing the wp-config.php file and adding define('WP_MEMORY_LIMIT', '256M');. You should also ask your hosting provider to increase the PHP max_execution_time to 300 seconds. Many UK hosts have a simple toggle in their control panel (e.g., in cPanel or a custom panel). Some hosts like 20i allow you to set PHP versions and limits directly. After making changes, run a speed test to see if the error recurs. If it does, you may need to optimise your database or use an object cache.

When to Contact Your UK Host (and What to Say)

If you've exhausted plugin conflicts and PHP tweaks, the issue might lie with your hosting provider's infrastructure. UK-based hosts are often more responsive, so don't hesitate. When you contact them, be specific: provide the exact URL that caused the 504, the time it occurred (using UK time), and any recent changes you made. Ask them to check the server error logs and look for any upstream timeout or FastCGI issues. If you use a CDN like Cloudflare, ask them to bypass it temporarily to see if the issue persists. A good host will help you trace the request path and even suggest upgrading your plan if you're hitting resource caps.

FAQ

A 504 Gateway Timeout means the server acting as a gateway (like Apache or NGINX) didn't get a timely response from another server that processes your WooCommerce requests. Customers see a generic '504 Error' screen, and they can't add to cart or check out. It's not a permanent failure – your data is safe – but it needs quick action to restore your store's usability.

Latest guides