How to Increase WordPress API Limits in the UK (2026)
17 August 2026
Practical UK guide to increasing WordPress REST API limits. Learn server tweaks, PHP settings, and code snippets for 2026.
What Limits Affect Your WordPress API in 2026?
WordPress API limits are not a single number. They are a mix of WordPress-specific restrictions, such as the default 100 posts per request, and server-side caps like execution time, memory, and request size. In the UK, many websites run on shared hosting where these limits are tight to keep costs low. Security plugins and firewalls also impose rate limits, which can block legitimate API calls. Understanding which limit is causing your 'too many requests' or timeout errors is the first step. It is often a combination of PHP settings and the way your API queries are structured. By identifying the bottleneck, you can apply the right fix efficiently and safely.
Increase PHP Execution Time and Memory for Heavy API Calls
Most API timeouts happen because PHP runs out of time or memory. On UK hosting, the default max_execution_time is often 30 seconds and memory_limit is 256M. For heavy REST API operations, this is rarely enough. To increase these limits, add custom code to your wp-config.php or .htaccess file. For example, set 'set_time_limit(120)' in its own PHP snippet, or use ini_set('memory_limit', '512M') before heavy calls. If you use Nginx, adjust the fastcgi_read_timeout directive. On Apache, consider a php.ini in the root folder. Some UK hosts like Krystal or 20i allow you to change these values from a control panel. Always test after making changes to ensure you haven't exceeded your plan's resources.
Raise the REST API Per-Page and Query Limits
WordPress REST API defaults to a maximum of 100 results per page. You can request more using 'per_page=250' in your query string, but the actual cap is defined by the 'rest_post_collection_params' filter. To increase it globally for all users, add a filter function in your theme's functions.php. Set the 'maximum' argument to your desired value, e.g. 500. Alternatively, make multiple paged requests (using 'page' or 'offset') to avoid hitting the cap. This is often a better approach for performance. For custom post types or comments, you may need separate filters. Remember that requesting too many posts at once can cause memory overload, so combine this with a higher memory limit and consider using fields=mixed to reduce data transferred.
Use Caching and Optimise Your API Responses for UK Visitors
Caching is a UK-friendly way to reduce API pressure without raising limits. Use object caching with Redis or Memcached to store frequent API responses. HTTP response caching via plugins like WP Rocket or a CDN with edge caching (Cloudflare, Bunny CDN) can serve cached JSON data to visitors across the UK and Ireland, reducing back-end load. Ensure you set the correct Cache-Control headers so that API responses are cached appropriately. If your API is public, consider a lightweight custom endpoint that returns only necessary fields. For UK GDPR compliance, avoid caching personal data in API responses. This approach lowers server load, so you may not need to increase limits at all, and it improves speed for your UK audience.
Monitor API Usage and Talk to Your UK Hosting Provider
If you still need higher limits, contact your UK hosting provider directly. Many providers, such as SiteGround, Krystal, or 20i, offer support to adjust PHP values or offer higher tiers with more generous limits. Use tools like Query Monitor or New Relic to track API request times and resource usage. This data is useful when explaining your requirements. Be aware that some hosts put hard caps on resources to protect their shared servers. In that case, you may need to upgrade to a VPS or dedicated server. Always ask about rate limiting and whether they can whitelist your API endpoints. This proactive approach prevents downtime and keeps your WordPress site fast for visitors across the UK.
FAQ
WordPress REST API defaults to a maximum of 100 items per request. You can specify 'per_page' up to that 100, but the hard limit is defined by the API settings. To increase it, you must use a filter such as 'rest_post_collection_params' to raise the 'maximum' value. Remember that your server may still impose memory and execution limits.