WooCommerce REST API Timeout Fix: A 2026 Guide for UK Store Owners

17 August 2026

Practical fixes for WooCommerce REST API timeouts in the UK. Boost site speed, tweak server settings, and prevent 504 errors in 2026.

Understanding Why Your WooCommerce REST API Times Out

The WooCommerce REST API is essential for syncing orders, managing inventory, and connecting with third-party tools. A timeout happens when a request takes longer than the server’s maximum execution time or the client’s waiting threshold. In the UK, common culprits include shared hosting limits, slow plugins, overly large payloads, and inefficient custom queries. When each request weighs down the server, the API responds with a 504 error. To fix this, you first need to diagnose whether the problem is server-side, plugin-related, or network-based. Enable WordPress debug logging and test the API endpoint directly using tools like Postman or cURL. UK store owners often overlook the impact of sub-5 second response times on user experience and integrations, so act quickly to keep operations running smoothly.

Increase PHP Execution Time and Memory Limit in the UK

A straightforward fix is to raise PHP limits. Many UK hosts set a conservative max_execution_time of 30 seconds, which can be too short for complex REST API requests. Edit your wp-config.php file to define a higher limit, such as 120 seconds, using set_time_limit(120) or ini_set('max_execution_time', 120). Also increase memory to 256M or higher with define('WP_MEMORY_LIMIT', '256M'). If you’re using a managed WordPress host in the UK like Krystal, 20i, or SiteGround, you may need to adjust these settings via your hosting control panel or by contacting support. Remember to use a child theme or custom plugin when applying PHP changes, rather than editing core files. This tweak alone resolves many timeouts, but it must be paired with performance improvements to avoid merely postponing the issue.

Optimise Database and Caching to Speed Up API Responses

Sluggish database queries are a leading cause of REST API timeouts. Clean up your WooCommerce database by removing orphaned post meta, expired transients, and post revisions. Use a plugin like WP-Optimize or a dedicated SQL cleanup script. Enable object caching with Redis or Memcached – UK hosting providers often offer these as add-ons. For API-specific caching, consider the WP REST Cache plugin, which caches GET responses and reduces server load. Also, ensure that your website’s page cache does not conflict with API calls; disable caching for /wp-json/ endpoints if necessary. A well-tuned database and caching layer can cut API response times by 40-60%, which is vital for UK retailers running real-time inventory synchronisation with ERP systems. Aim for API responses under 2 seconds to prevent timeouts and keep integrations reliable.

Leverage UK-Based CDN and Fast Hosting Infrastructure

Geographic distance between your API clients and server increases latency. If you serve customers across the UK and Europe, use a Content Delivery Network with UK PoPs, such as Cloudflare’s London or Manchester data centres, or a UK VPS from a provider like OVHcloud or Ionos. While a CDN does not directly speed up dynamic API calls, it can handle static assets and reduce overall server load. For high-traffic stores, consider moving to a dedicated server or high-performance cloud hosting with guaranteed CPU resources. On your hosting, enable HTTP/2 and keep PHP up to date – PHP 8.3 can be significantly faster than older versions. UK-specific hosting regulations mean you should also verify that your CDN and hosting providers are GDPR-compliant. These infrastructure changes minimise packet loss, reduce response times, and go a long way towards fixing repeat timeouts.

Implement Retry Logic and Throttling on the Client Side

Not every timeout needs a server-side fix. If you control the client application making requests (e.g., a custom integration or a UK-based fulfilment service), implement a retry mechanism with exponential backoff. For example, retry a failed request after 2, 4, and 8 seconds instead of bombarding the server. You should also throttle requests to avoid exceeding your server’s PHP worker limits – WooCommerce REST API supports batch processing, so combine requests into fewer calls. Use the 'per_page' parameter to limit the number of items per request, and paginate through results. On your WordPress site, you can also extend the timeout for external API calls via filters like 'http_request_timeout' in functions.php. This balanced approach prevents server overload while maintaining smooth data flows, which is crucial for UK online retailers managing stock across multiple channels.

FAQ

WordPress sets a default HTTP request timeout of 5 seconds for outgoing requests. For incoming API requests, the server’s max_execution_time usually applies, often 30 seconds. WooCommerce itself doesn’t specify a separate API timeout, so it relies on these server-level settings. If your requests are timing out, check both your PHP settings and the client’s request timeout.

Latest guides