The WordPress memory limit exceeded error stops your site from loading and leaves visitors staring at a blank screen or a critical error message. It happens when your site tries to use more PHP memory than your server currently allows, and it is one of the most common and most fixable WordPress errors you will encounter.
Most site owners panic when they see it. You do not need to. This error is not a sign that your site is broken forever. It simply means your website’s needs have outgrown the resources currently assigned to it. This guide walks you through exactly what causes it, how to check your current memory limit, and the fastest ways to fix it for good.
The WordPress memory limit exceeded error happens when a plugin, theme, script, or WordPress process uses more PHP memory than your server allows. Once the PHP memory limit is exhausted, WordPress may stop loading properly, crash the admin dashboard, show fatal error messages, or trigger website downtime.
What Causes the WordPress Memory Limit Exceeded Error?
The memory limit exceeded error is almost always caused by too many resource-heavy plugins, low hosting memory caps, or a site that has simply grown beyond what its current server allocation can handle.

A fresh WordPress installation uses a small amount of server RAM and runs comfortably within minimal memory limits. As your site grows and you add more plugins, media, and traffic, the demand for PHP memory increases, eventually reaching its limit and causing memory exhaustion. Here is what most often pushes sites over the limit.
- Resource-Heavy Plugins: Feature-rich plugins like WooCommerce, page builders like Elementor or Divi, and heavy security suites load significant amounts of code into memory every time a page is requested.
- Too Many Plugins Running at Once: Even lightweight plugins add to the total memory load. If your PHP memory limit is set to 64MB and you have thirty active plugins, the combined memory required to initialize all of them may exceed the capacity before the page finishes loading.
- Large Unoptimized Images: Uploading large image files triggers memory-intensive processing that can push sites over their limits, especially on lower-tier hosting plans.
- WooCommerce Operations: WooCommerce stores with large product catalogs frequently hit memory limits during inventory syncs, report generation, or bulk operations.
- Outdated Plugins and Themes: Poorly coded or outdated plugins can cause memory leaks that gradually consume available resources, leading to site crashes.
- Low Hosting Memory Caps: Budget hosting plans often set aggressive memory limits of 32MB to 64MB to fit more customers on shared servers. On these plans, the limit itself is the problem, not your site.
How to Check Your Current WordPress Memory Limit?
The quickest way to check your current PHP memory limit is through your:
WordPress dashboard ⟶ Tools ⟶ Site Health ⟶ Info ⟶ Server.
No file editing required.
Here are all the ways to check it depending on your situation.
- WordPress Site Health: Navigate to Tools, then Site Health, then Info, then Server to see your current PHP Memory Limit directly in your WordPress dashboard. This is the safest and easiest way to check without touching any files.
- Hosting Control Panel: Most hosting providers show PHP memory settings in your control panel under PHP settings or PHP configuration. Check here if you cannot access your WordPress dashboard.
- Query Monitor Plugin: Install the free Query Monitor plugin and check the Overview tab. It shows PHP memory usage per page load and tells you exactly which plugins, themes, and database queries are consuming the most resources.
- phpinfo() File: Create a text file named info.php containing the standard phpinfo() function and upload it to your root directory. Open it in your browser to view your full raw PHP configuration from the server.
Common Signs Your WordPress Site Has Memory Problems
WordPress memory problems often appear before the website fully crashes. Slow performance, failed updates, timeout errors, and unstable admin behavior usually indicate that PHP memory resources are being exhausted.
- White Screen of Death: Pages suddenly load blank, with no visible error messages.
- Fatal Error Messages: WordPress displays PHP fatal errors related to memory exhaustion.
- Slow Admin Dashboard: The WordPress admin area becomes unusually slow or unresponsive.
- Failed Plugin Updates: Plugin or theme updates repeatedly fail during installation.
- Random Website Crashes: Pages stop loading properly during traffic spikes or heavy processes.
- Timeout Errors: Backups, imports, exports, or large uploads fail because server processes run out of memory.
How WPTasks Helps Fix and Prevent WordPress Resource Errors?
WPTasks helps businesses troubleshoot recurring WordPress performance problems before they affect website stability, SEO, and user experience. From PHP configuration fixes to plugin optimization and server-level troubleshooting, the team helps identify the causes of excessive resource usage and website crashes.

WPTasks also provides ongoing WordPress maintenance, performance monitoring, malware cleanup, plugin management, and hosting support to help websites run faster and more reliably long term. This proactive approach helps reduce downtime, improve website performance, and prevent recurring server resource issues.
WordPress Memory Error Slowing Your Site Down?
Fix memory limit issues, update conflicts, and performance problems with expert WordPress maintenance that keeps your website stable and running smoothly.
Recommended PHP Memory Limits for WordPress Websites
The ideal PHP memory limit depends on website size, traffic, plugins, and ecommerce functionality. Larger WordPress websites usually require higher memory allocation to maintain stability and performance.
- 128MB: Suitable for smaller blogs and lightweight informational websites.
- 256MB: Recommended for most business websites using multiple plugins and themes.
- 512MB or Higher: Often needed for WooCommerce stores and ecommerce websites with higher traffic.
- Higher Allocations: Large ecommerce platforms, membership websites, and resource-heavy websites may require significantly more server resources.
How to Fix the WordPress Memory Limit Exceeded Error: Step by Step?
The WordPress memory limit exceeded error is usually fixable within a few minutes once you correctly identify the cause. Start with the simplest solution first because most websites recover after increasing the PHP memory limit using Method 1 alone.

Method 1: Increase Memory Limit in wp-config.php
This is the fastest and most reliable fix for most sites. Open your wp-config.php file using FTP, cPanel File Manager, or your hosting file manager. Find the line that says “stop editing” and add these two lines directly above it:
define(‘WP_MEMORY_LIMIT’, ‘256M’); define(‘WP_MAX_MEMORY_LIMIT’, ‘512M’);
For most sites, 256MB is sufficient. For ecommerce or complex setups, 512MB is safer. The first line sets the frontend memory limit, and the second sets the admin area limit. Save the file, upload it back to your server, and refresh your site to check if the error is resolved.
If you want to see the full technical error message rather than the generic critical error screen, temporarily enable debug mode by adding define(‘WP_DEBUG’, true) to wp-config.php. This reveals the exact details of memory exhaustion, including which file and line triggered it. Turn WP_DEBUG off again once you have identified the problem.
Method 2: Increase Memory Limit via php.ini
If wp-config.php does not resolve the error, the server-level php.ini file may be overriding your WordPress settings. Look for a php.ini file in your WordPress root directory. If one does not exist, create one. Add this line:
memory_limit = 256M
Save the file and upload it to your root directory. This sets the memory limit at the PHP level rather than the WordPress application level, which takes priority over the wp-config.php setting in most hosting environments.
Method 3: Increase Memory Limit via .htaccess
If neither of the above methods works, try adding the following line to your .htaccess file:
php_value memory_limit 256M
Be cautious with this method. Changing your .htaccess file can cause site-wide errors because it governs how your site interacts with your server. Always back up your .htaccess file before editing it, and test your site immediately after making changes.
Method 4: Ask Your Hosting Provider
If editing your files does not work, the fastest solution is to call or use live chat with your host to ask them to raise the PHP memory_limit for your account. Some shared hosting providers impose a hard cap that prevents you from increasing the limit beyond a certain point, regardless of what you add to your files. In that case, your host is the only one who can raise it.
What to Do If Increasing the Memory Limit Does Not Fix the Error?
If the error persists after increasing the limit, a specific plugin, theme, or database query is consuming memory abnormally and needs to be identified and removed.
Here is how to find the cause.
- Deactivate All Plugins: Deactivate all plugins, then reactivate them one at a time. When the error returns, you have found the culprit. Replace or update that plugin.
- Use Query Monitor: Review memory usage per page load using the Query Monitor plugin and identify which plugins or queries are consuming the most resources. This tells you exactly where the problem is without guesswork.
- Switch to a Default Theme: Temporarily activate a default WordPress theme like Twenty Twenty-Four to rule out a theme-related memory issue. If the error disappears, your theme is the cause.
- Update Everything: Outdated plugins and themes with known memory leaks are a common cause of persistent errors. Update everything and retest before making any other changes.
- Upgrade Your Hosting: If you consistently hit memory walls despite optimization, it may be time to upgrade from shared hosting to a VPS or managed WordPress hosting plan with dedicated resources. On shared hosting, the memory cap is often set by the server regardless of what your files say.
How Much PHP Memory Does Your WordPress Site Actually Need?
The right PHP memory limit depends on your site’s complexity. Most business sites need 256MB. WooCommerce stores and membership sites need at least 512 MB.
Here is a simple reference guide.
| Site Type | Recommended Memory |
|---|---|
| Simple blog or brochure site | 64MB to 128MB |
| Business site with plugins | 128MB to 256MB |
| WooCommerce store | 256MB to 512MB |
| Membership or LMS site | 256MB to 512MB |
| High-traffic or complex site | 512MB or more |
Why Cheap Hosting Often Causes Memory Errors?
Cheap shared hosting plans often limit PHP memory allocation, server resources, and the number of PHP workers to support large numbers of websites on the same server. As WordPress websites grow, these restrictions frequently trigger memory limit errors and performance instability.
Low-cost hosting environments also struggle with resource-heavy plugins, WooCommerce functionality, traffic spikes, and larger databases. Better managed WordPress hosting improves scalability, stability, website speed, and server resource management more effectively.
Plugins That Commonly Trigger Memory Limit Problems
Some WordPress plugins consume large amounts of PHP memory, especially on shared hosting environments or resource-heavy websites. Multiple heavy plugins running together often lead to memory exhaustion and website instability.
- Backup Plugins: Full-site backup tools can consume large server resources during backups and restores.
- Page Builders: Visual page builders often increase PHP memory usage because of heavy scripts and dynamic content loading.
- Security Scanning Plugins: Malware scanners and firewall plugins may use significant server resources during deep scans.
- WooCommerce Extensions: Ecommerce plugins and advanced WooCommerce add-ons often require higher PHP memory allocation.
- Import and Export Tools: Large imports, migrations, and data exports can quickly exhaust memory.
- Image Optimization Plugins: Bulk image compression and optimization can temporarily increase memory usage.
How to Reduce WordPress Memory Usage
Reducing WordPress memory usage helps improve website stability, performance, and server efficiency. Regular optimization also prevents recurring PHP memory exhaustion errors and improves long-term website health.
Remove Unused Plugins and Themes
Unused plugins and themes still consume server resources and may create unnecessary background processes. Removing inactive tools helps reduce PHP memory usage and improves overall website performance.
Too many plugins can also increase compatibility issues, slow admin performance, and trigger memory exhaustion more frequently.
Upgrade to a Better Hosting Environment
Cheap shared hosting often provides limited server resources, which struggle to support growing WordPress websites. Upgrading to managed WordPress hosting or scalable cloud infrastructure improves memory allocation and website stability.
Better hosting environments also improve uptime, speed, and resource management for high-traffic or WooCommerce websites.
Optimize WordPress Database Performance
Large databases with spam comments, revisions, expired transients, and unused tables can significantly increase server load. Database optimization helps WordPress processes run more efficiently with lower memory consumption.
Regular database cleanup also improves admin responsiveness, backup speed, and website performance.
Use Lightweight Plugins and Themes
Heavy themes and bloated plugins often consume unnecessary memory and slow website performance. Lightweight alternatives reduce resource usage and improve Core Web Vitals scores.
Cleaner code and optimized themes also improve mobile performance, crawlability, and long-term stability.
Update PHP and WordPress Core Files
Outdated PHP versions and old WordPress core files often cause compatibility issues and inefficient memory usage. Updating to newer PHP versions improves performance, security, and server efficiency.
Regular updates also reduce plugin conflicts and help WordPress processes run more smoothly with lower resource consumption.
How Memory Problems Affect SEO and UX?
WordPress memory problems can directly affect the user experience because slow websites, crashes, and downtime reduce website reliability. Visitors often leave websites quickly when pages fail to load properly or become unresponsive.
Poor website stability also affects Core Web Vitals, bounce rates, and search engine trust signals. Frequent downtime and slow performance can weaken rankings, reduce conversions, and negatively impact long-term SEO visibility.
How to Prevent the WordPress Memory Limit Error From Coming Back?
Preventing this error in the long term comes down to keeping your plugin stack lean, staying on top of updates, and choosing a hosting plan that gives your site enough memory to grow without hitting a wall.
Here is what to do consistently.
- Audit Your Plugin Stack Regularly: Every three to six months, review your installed plugins and remove anything redundant, outdated, or replaced by a better option. Every active plugin adds to your memory load, whether you actively use it or not.
- Keep Everything Updated: Outdated plugins and themes develop memory leaks over time. Keeping everything updated reduces the risk of gradual memory consumption that builds until it crashes your site.
- Choose Hosting With Generous Memory Allocations: Managed WordPress hosting plans typically provide higher default memory limits and better server configurations than shared hosting. For growing sites, the hosting environment matters as much as the code.
- Monitor Memory Usage: Use Query Monitor or your hosting dashboard to check memory usage regularly. Catching a memory spike early is far easier than diagnosing a crash after the fact.
- Remove Unused Themes and Plugins: Even deactivated plugins and unused themes add code to your WordPress installation. Delete what you are not using to keep your site lean.
Conclusion
The WordPress memory limit exceeded error looks serious, but it is almost always fixable in minutes. Start by adding the WP_MEMORY_LIMIT constant to your wp-config.php file, verify your host is not overriding it with a hard cap, and clean up any plugins that are consuming memory abnormally.
Keeping the error from coming back comes down to three things: the right hosting plan, a lean plugin stack, and regular monitoring. WPTasks supports businesses across the United States, the United Kingdom, Australia, and globally with WordPress technical support, memory optimization, and ongoing site maintenance, so errors like this get fixed before they cost you traffic or revenue.
FAQs
What causes PHP memory exhaustion in WordPress?
PHP memory exhaustion usually happens when plugins, themes, scripts, or server processes consume more memory than the hosting environment allows.
Why does my WordPress website keep crashing randomly?
Random crashes often occur due to insufficient server resources, heavy plugin usage, outdated PHP versions, or overloaded hosting environments.
Can plugins increase server memory usage?
Yes, resource-intensive plugins such as page builders, backup tools, security scanners, and ecommerce extensions can significantly increase server memory usage.
Does shared hosting affect website performance issues?
Cheap shared hosting often aggressively limits server resources, leading to slow performance, timeouts, and website instability.
How much PHP memory does a WooCommerce website need?
Many WooCommerce websites perform better with at least 512MB of PHP memory, as ecommerce operations typically consume more server resources.
How can businesses prevent recurring server resource errors?
Businesses can reduce recurring issues by optimizing plugins, cleaning databases, upgrading hosting, updating PHP versions, and regularly monitoring website performance.


