Rizwan Rizwan
HOME SERVICES CASE STUDIES BLOG ABOUT $100 USD FREE Consultation Call →
WORDPRESS

How to Increase the Memory Limit on WPEngine

When managing a WordPress site on WPEngine, you might find the default memory limits insufficient for your needs. Often, this can be attributed to a memory

Rizwan Rizwan May 6, 2025 3 min read
How to Increase the Memory Limit on WPEngine

When managing a WordPress site on WPEngine, you might find the default memory limits insufficient for your needs. Often, this can be attributed to a memory leak—a problem I’ve personally faced on numerous occasions. Whether it’s due to resource-heavy plugins, complex themes, or intensive operations, proactively increasing the memory limit is crucial for maintaining optimal site performance and stability.

WPEngine sets the default WordPress Memory Limit to 40MB for a single site and 64MB for a Multisite network. But for more demanding tasks, you can increase this limit up to 512MB​​. Source

Don’t have a WPEngine account or any WordPress hosting yet? Sign up through this link and get 4 months free with an annual plan.

Step-by-Step Guide to Increase Memory Limit on WPEngine:

  1. Access the wp-config.php File: Locate and edit this file via SFTP or through the WPEngine User Portal.
  2. Set the New Memory Limits: Insert the following lines within the “WP Engine Settings” section:
    define ('WP_MEMORY_LIMIT', '512M');

    For the admin area, you might want to specify a different limit:
    define ('WP_MAX_MEMORY_LIMIT', '512M');

    These adjustments help if you’re experiencing memory issues in the admin dashboard​​​​.

  3. Save and Verify: After saving your changes, verify the new limits in the “Site Health” section of the WordPress dashboard.

Keep in mind that the maximum allowable memory might be limited by your hosting plan with WPEngine​​.

Understanding PHP Memory Exhaustion:

Encountering a “Fatal error: Allowed memory size of xxxxxx bytes exhausted” message is a sign that your WordPress site is reaching or exceeding its memory limits. PHP sets these limits to prevent scripts from over-consuming server resources.

Common Causes of Memory Exhaustion:

  • Complex Plugins/Themes: Some plugins and themes are resource-intensive by nature, especially if they contain inefficient code.
  • Data-Intensive Operations: Large-scale data operations, like importing extensive content, can quickly use up memory.
  • Plugin Overload: Using many plugins simultaneously can add up, exceeding the available memory.

Resolving Memory Exhaustion:

  • Plugin Management: Deactivate and delete any plugins that aren’t essential to your site’s functionality.
  • Code Optimization: Have a developer review and optimize any custom code to improve efficiency.
  • Memory Limit Increase: Follow the steps outlined above to raise the PHP memory limit through the wp-config.php file.

By understanding the reasons behind memory exhaustion and knowing how to increase the memory limit, you can enhance your site’s performance and avoid potential errors that could disrupt your website’s operation. Always remember to backup your website before making changes to critical files like wp-config.php. This ensures you can restore your site if needed and proceed with confidence as you optimize your site’s resources.

Rizwan

About Rizwan

Full-stack developer and technical leader with 13+ years building scalable web applications. I help agencies and startups ship faster through strategic guidance and hands-on development.

MORE INSIGHTS

Keep reading for more development wisdom.

DevOps

Redis Object Cache on OpenLiteSpeed: Halve WooCommerce TTFB

Learn how Redis object cache on OpenLiteSpeed can cut WooCommerce Time-to-First-Byte by up to 50%. Follow this step-by-step guide with real benchmarks.

Rizwan Rizwan May 27, 2025 5 min read

HOW I CAN HELP YOU

I work with founders, agencies, and developers who need that extra push to get projects live. Whether it's fixing a stubborn bug, steering your tech strategy, or building full apps with my team. You don't have to do it alone

GET UNSTUCK

60-minute call to debug your specific problem. Stop spinning your wheels.

$249
BOOK NOW →

FRACTIONAL CTO

Ongoing strategic guidance to prevent disasters like this.

$2k-7k/mo
LEARN MORE →

CUSTOM DEV

Full project rebuild with our expert team. Done right the first time.

Custom
GET QUOTE →