WordPress’s memory limit is the maximum amount of PHP memory a single WordPress process can use. When a page load, plugin operation, or background task tries to use more memory than the limit allows, PHP throws a fatal error: Allowed memory size of X bytes exhausted. The page fails to load, the operation stops mid-execution, and you get a white screen or 500 error. Understanding what the limit is, how to check it, and how to increase it on WP Engine takes about five minutes.
Memory Limits in WordPress: Three Separate Settings
WordPress has two distinct memory limit settings, and PHP has its own limit on top of these:
| Setting | What it controls | Where it is set |
| WP_MEMORY_LIMIT | Memory for front-end page loads | wp-config.php |
| WP_MAX_MEMORY_LIMIT | Memory for admin tasks (importing, exporting, updates) | wp-config.php |
| PHP memory_limit | Hard server-level cap (overrides WordPress settings) | php.ini / server config |
WordPress cannot allocate more memory than PHP’s server-level limit allows, regardless of what WP_MEMORY_LIMIT is set to. If your wp-config.php says 512M but the server’s PHP limit is 256M, you get 256M.
Default Memory Limits on WP Engine
WP Engine sets the PHP memory limit to 256MB by default on all plans. WordPress’s WP_MEMORY_LIMIT default is 256MB and WP_MAX_MEMORY_LIMIT is 256MB. For most WordPress sites and plugins, 256MB is sufficient. WooCommerce, page builders, image processing operations, and complex import/export tasks occasionally require more.
To check your current memory usage and limits, install the Health Check and Troubleshooting plugin and check Site Health, or use Query Monitor’s PHP information panel. The current memory limit and peak memory usage per page load are both visible.
How to Increase the WordPress Memory Limit on WP Engine
On WP Engine, PHP configuration is managed through the dashboard rather than a traditional php.ini file. To increase the memory limit:
Method 1: WP Engine dashboard. Navigate to your environment, go to PHP Settings or Configuration, and adjust the memory_limit value. This is the cleanest approach and does not require editing files.
Method 2: wp-config.php. Add these lines above the /* That's all, stop editing! */ comment in wp-config.php:
define( 'WP_MEMORY_LIMIT', '512M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );
This works if WP Engine’s server-level PHP limit is at or above 512MB. If you need to exceed WP Engine’s default PHP limit, contact WP Engine support to request an increase for your environment.
Method 3: .user.ini file. On WP Engine, you can create a .user.ini file in your site’s root directory with memory_limit = 512M. WP Engine reads .user.ini for PHP configuration overrides. This is the most reliable method for setting the PHP-level memory limit directly.
When Memory Limit Increases Are and Are Not the Right Fix
Increasing the memory limit solves a genuine problem when a legitimate WordPress operation — a large WooCommerce product import, processing a high-resolution image, a complex page builder render — genuinely requires more memory than the current limit allows.
It is not the right fix when a poorly coded plugin is consuming exponentially more memory than it should. A plugin that allocates 400MB to display a simple widget has a bug, not an insufficient memory limit. Before increasing the limit, use Query Monitor to identify which plugin or code is consuming unusual memory and investigate whether the plugin itself is the problem.
As a general guideline: 256MB covers most WordPress sites. 512MB is appropriate for WooCommerce stores with complex product configurations, page builders, or heavy import operations. 1024MB and above is rarely necessary and usually indicates a plugin memory leak rather than a genuine requirement.
Frequently Asked Questions
What is the default PHP memory limit on WP Engine?
WP Engine sets the PHP memory limit to 256MB by default on all plans. WordPress’s own WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT are both set to 256MB by default. For most sites this is sufficient. Memory limits can be increased via the WP Engine dashboard PHP settings or via a .user.ini file in your site root.
How do I fix the WordPress memory exhausted error?
First, identify what triggered the error — check your error log for the file path and line number in the memory exhausted message. This tells you which plugin or operation caused it. If it is a legitimate memory-intensive operation (large import, complex page render), increase the memory limit via wp-config.php or the WP Engine dashboard. If a plugin is consuming excessive memory unexpectedly, investigate the plugin for bugs or replace it.
Can I set the PHP memory limit higher than 256MB on WP Engine?
Yes. Create a .user.ini file in your site root with memory_limit = 512M (or higher) to increase the PHP memory limit. You can also adjust it from the WP Engine dashboard PHP settings. For limits above what the dashboard allows, contact WP Engine support to request a custom increase for your environment.





