WordPress Memory Exhausted Error: Decode and Fix It
WordPress allowed memory size exhausted? Paste the error into our free decoder, raise WP_MEMORY_LIMIT the right way, or find the plugin wasting memory.

Last updated December 2, 2026
Your WordPress site shows “Fatal error: Allowed memory size of 134217728 bytes exhausted”. Or the screen just says there was a critical error.
It means a piece of code asked for more memory than PHP allows. The number in the message tells you the current limit.
This guide decodes that number, raises the limit the WordPress way, and shows when a plugin is the real problem.
Key Takeaways
- The number in the error is in bytes. 134217728 bytes is exactly 128 MB.
- Raise the limit with
WP_MEMORY_LIMITin wp-config.php, above the wp-settings line. - Use
WP_MAX_MEMORY_LIMITfor heavy admin tasks like updates and imports. - WordPress says some hosts block automatic increases. Ask your host if nothing changes.
- If the error survives a big limit, a plugin or theme is the cause.
Decode Your Memory Error
Paste the error line below. The decoder reads your current limit and suggests a safe next value.
Memory error decoder
Paste the error line from your screen or error log. The decoder turns the bytes into megabytes and suggests a next step.
Your result appears here.
Digieh tool. Runs in your browser only. Nothing is sent to us.
Editor’s Note
This guide is accurate as of Digieh check. Most guides jump straight to adding code. The byte number already tells you your limit, so you know whether raising it can even help.
Spot an error in this article? Please contact us at support@digieh.com or read our Corrections Policy.
Find Your Fix
Now tell the finder when the error shows and what access you have.
Memory error fix finder
Answer two questions. The finder tells you whether to raise memory or find a broken plugin. It runs in your browser only.
Digieh tool. Based on WordPress developer docs, read December 2, 2026.
What Do the Numbers Mean?
| Bytes in the error | Limit in MB | What to try |
|---|---|---|
| 33554432 | 32 MB | Raise to 128M |
| 67108864 | 64 MB | Raise to 128M or 256M |
| 134217728 | 128 MB | Raise to 256M |
| 268435456 | 256 MB | Raise to 512M, then check plugins |
| 536870912 | 512 MB | Find the plugin or theme |
Source: PHP manual on memory_limit (1 MB = 1,048,576 bytes). Suggestions are Digieh’s reading.
How Do You Raise the Memory Limit in wp-config.php?
WordPress developer docs explain two settings. Add them to wp-config.php in your main WordPress folder.
define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' );- Open your host’s file manager and download wp-config.php as a backup.
- Edit the file and find the line that says to stop editing.
- Paste the two lines above that line.
- Save the file and reload your site.
WordPress says these settings must come before wp-settings.php is loaded. Placing them at the very bottom will not work.
Type the quotes as plain straight quotes. Curly quotes copied from some websites break the file.
Free updates
Join the Digieh list
Be the first to know when our weekly brief launches.
No spam. Unsubscribe anytime. Read our Privacy Policy.
How Do You Check the Current Limit?
WordPress shows your server limits in Site Health. Our decoder reads the error, but this confirms the real setting.
- Go to Tools, Site Health.
- Open the Info tab.
- Expand Server and find PHP memory limit.
- Also expand WordPress Constants to see the WordPress memory values.
The Site Health documentation describes each section of this screen.
What fixed your memory exhausted error?
- Raising WP_MEMORY_LIMIT
- Asking my host
- Removing a plugin
- Changing the theme
- Not sure
Where Do You Find the Full Error?
Sometimes WordPress only shows a short message. The full line, with the byte number and file path, lives in a log.
- Your host’s error log, often in the control panel under Logs.
- The debug.log file in wp-content, if debug logging is on.
- The email WordPress sends when a fatal error triggers recovery mode.
Copy the whole line into the decoder above. The file path at the end often names the plugin or theme that ran out of memory.
What Is the Difference Between the Two Settings?
WordPress has two memory settings. They cover different parts of the site.
WP_MEMORY_LIMITcovers normal pages that visitors see.WP_MAX_MEMORY_LIMITcovers admin work, like updates, image edits and imports.- Both only work if your host lets WordPress raise the PHP memory limit.
If the error only appears in wp-admin, raising the admin setting alone is often enough. Your public pages keep a smaller, safer limit.
Why Does the Limit Not Change?
WordPress docs say some hosts do not allow the PHP memory limit to rise automatically. In that case your wp-config.php change is ignored.
- Check Site Health again after the change.
- If the number did not move, your host caps it.
- Ask support to raise the PHP memory limit for your account.
- Some panels have a PHP settings page where you can raise it yourself.
WordPress raises the PHP limit for you when the host allows it. When the host blocks changes, its own setting wins.
Hosts often set limits per plan. A cheaper plan may cap memory lower than a business plan.
Still hitting the cap after removing heavy plugins? A plan upgrade or a lighter setup may be the real answer.
Ask your host which limit your plan allows before you pay for an upgrade. Sometimes support can raise it for free.
When Is a Plugin the Real Problem?
A healthy WordPress site rarely needs more than 256 MB for normal pages. If it still runs out, some code is wasting memory.
- Look at the file path in the error. It often names the plugin folder.
- Rename that plugin’s folder in wp-content, plugins.
- Reload the site. If it works, update or replace the plugin.
- If no plugin is named, rename the whole plugins folder to test.
If the screen only says there has been a critical error, check your email for WordPress’s recovery link. Our WordPress critical error guide explains recovery mode.
What If You See a Blank Page Instead?
With error display turned off, a memory error can show as a white screen or a 500 error. The cause is the same.
See our WordPress white screen guide or the WordPress 500 error guide to find the message in your error log.
Turning on debug logging writes errors to a file without showing them to visitors. That is the safest way to read the full line.
How Much Memory Does WordPress Need?
It depends on your plugins and theme. A simple blog uses little. Page builders, shops and large imports use much more.
- Small blog with few plugins: 128M is usually plenty.
- Shop or page builder site: 256M is a common choice.
- Imports, backups and big updates: raise the admin limit only.
These are common starting points, not rules. Your host’s plan may also set a ceiling.
Fewer active plugins usually means less memory used per page. Remove plugins you no longer need.
Upload blocked for size rather than memory? See our WordPress upload max filesize guide.
Upload blocked with a security message instead? Check our file type not permitted fix.
Test Yourself
The error says 134217728 bytes. What is your current limit?
- 128 MB
- 13 MB
- 1 GB
134217728 divided by 1,048,576 bytes per MB equals exactly 128 MB.
Where must the memory defines go in wp-config.php?
- Before wp-settings.php is loaded
- At the very end of the file
- In the theme folder
WordPress docs say the setting has to be placed before the wp-settings.php inclusion.
Frequently Asked Questions
Is the memory exhausted error dangerous?
No. Your content is safe. The page just stops loading when memory runs out.
What is a good WordPress memory limit?
256M suits most sites. Simple blogs often run fine on 128M.
Why does the error come back after I raised the limit?
Your host may cap memory, or a plugin may be leaking it.
Can I raise memory without editing files?
Yes. Many hosts let you change the PHP memory limit in their control panel.
Does more memory make my site faster?
No. It only lets heavy tasks finish. Speed depends on other things.
Conclusion
Decode the bytes in the error to learn your current limit. Raise it with WP_MEMORY_LIMIT before the wp-settings line, and check Site Health. If the limit does not move, ask your host. If the error survives a large limit, find the plugin or theme that is wasting memory.
Editor’s Note
This guide is accurate as of December 2, 2026. We checked WordPress developer docs, the PHP manual and WordPress.org documentation on that date.
Spot an error in this article? Please contact us at support@digieh.com or read our Corrections Policy.
Keep exploring
Your next read is waiting
1AI & TechPlugged In, Not Charging: Laptop Fault or Feature?7 min read
2Visas & PassportsDS-160 Photo Size: The Rule Most Guides Miss7 min read
3AI & TechFix Windows Update Error 0x800f081f the Right Way8 min read
4AI & TechTouchpad Not Working in Windows 11: Quick Fixes7 min read
5AI & TechWindows Stuck on Working on Updates: Safe Fixes7 min read
6AI & TechPrinter Offline on Windows: Simple Fixes in Order7 min readFound this useful?












