
define( 'WP_MEMORY_LIMIT', '256M' ); to wp-config.php, and raise PHP’s own memory_limit in your hosting panel if needed. If the error comes back, a heavy plugin, huge image or bloated database is the real cause. Most sites are fixed within an hour.You click Update on a product page, open the Elementor editor or import some data, and WordPress stops with a line like “Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes)”. Sometimes you only see “There has been a critical error on this website” or a blank page. Customers may see the same thing.
The good news: the WordPress memory exhausted error has a name, a number and a file path, so it is easier to diagnose than a generic crash. If your site only shows a bare “500 Internal Server Error” with no memory message, start with our guide to fixing a 500 internal server error instead.
This guide is for Malaysian business owners who need the site working today. It ranks the causes, gives the fix (checked against WordPress’s official documentation in October 2026), realistic timings, prevention and when to hand it over.
This short video walks through raising the memory limit and checking plugins and themes, the same order we use below.
Source video: Watch on YouTube (wppluginsforyou)
Quick Answer: It means PHP, the language WordPress runs on, hit its memory ceiling while building a page or running a task, so it stopped. The first number in the message is your current limit in bytes. The file path at the end usually points to the plugin or theme that was running when memory ran out.
Every time someone loads a page, PHP sets aside memory to run WordPress, your theme and every active plugin. The server caps how much one request can use. PHP’s own manual lists the memory_limit setting with a default of 128M, and many hosts change it. When a request needs more, PHP stops with a fatal error. Use the table below to turn the bytes in your message into a limit you can read:
| Bytes in the error | Limit | What it usually means |
|---|---|---|
| 41,943,040 | 40 MB | WordPress’s own default for a single site. Too low for most business sites. |
| 67,108,864 | 64 MB | A low cap common on older or budget shared hosting. |
| 134,217,728 | 128 MB | PHP’s default. Fine for a brochure site, tight for WooCommerce or page builders. |
| 268,435,456 | 256 MB | Already generous. Hitting this usually points to a faulty plugin or task, not a low limit. |
| 536,870,912 | 512 MB | Something is looping or loading far too much data. Raising the limit further rarely helps. |
Source: Byte-to-megabyte conversions (1 MB = 1,048,576 bytes); defaults from the WordPress Advanced Administration Handbook and the PHP manual. Interpretation from ZenWeb WordPress support across Malaysian client sites, 2024–2026.
The “tried to allocate” number is often tiny; it just means the request was already at the ceiling. Read the file path at the end. A path containing /wp-content/plugins/plugin-name/ names the plugin running when memory ran out.
Quick Answer: The most common cause is simply a limit set too low for what the site now does, such as adding WooCommerce or a page builder. Next come a single heavy or faulty plugin, oversized image uploads, bulk imports and exports, and a bloated database. Hosting that caps memory below what WordPress asks for comes last.
WordPress’s Common WordPress Errors guide lists “Allowed memory size exhausted” under fatal errors, and also names the memory limit as a common cause of the “critical error” message. Here is how the triggers rank on the business sites we support:
| Trigger | Share of cases |
|---|---|
| Limit too low after adding WooCommerce or a page builder | 34% |
| One heavy or faulty plugin (often after an update) | 26% |
| Very large image uploads (phone photos, 5–15 MB each) | 16% |
| Bulk imports, exports or backups run in WP Admin | 12% |
| Bloated database (autoloaded options, old logs) | 7% |
| Hosting plan hard-caps PHP memory | 5% |
Source: From ZenWeb client tracking of Malaysian SME WordPress sites, 2024–2026. Illustrative of typical patterns, not WordPress.org data.
Timing is your best clue. If the error started straight after a plugin update, suspect that plugin. If it only appears when you open the page builder, the builder needs more memory; our guide to Elementor not loading covers the editor spinner that often comes first. If it appears when you upload photos or import products, the task is the problem.
Rather not edit wp-config.php yourself?
We build and maintain WordPress sites for Malaysian businesses, sized for the plugins and traffic they actually run. See our WordPress web design services →
Quick Answer: If you can still log in, go to Tools > Site Health > Info. The Server section shows PHP’s memory limit, and WordPress Constants shows WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT. If you are locked out, read the bytes in the error message or check PHP settings in your hosting panel.
WordPress’s Site Health screen documentation confirms the Info tab’s Server section shows your PHP settings, and notes that many server values can only be changed by your host. Look for three values:
Locked out of WP Admin? Check the site admin’s inbox for WordPress’s recovery mode email, or see our guide to being locked out of WordPress admin. A blank page with no message is covered in our WordPress white screen fix.
Quick Answer: Back up wp-config.php, then add define( 'WP_MEMORY_LIMIT', '256M' ); above the “That’s all, stop editing!” line. If the error stays, raise PHP’s memory_limit to 256M in your hosting panel’s PHP settings. Clear caches and repeat the action that failed. If your host caps memory, ask them to raise it.
These steps follow the “Increasing memory allocated to PHP” section of WordPress’s official wp-config.php guide, checked in October 2026. Most Malaysian hosting plans use cPanel or Plesk:
public_html, next to wp-admin and wp-content./* That's all, stop editing! */, add define( 'WP_MEMORY_LIMIT', '256M' );. For heavy admin tasks, also add define( 'WP_MAX_MEMORY_LIMIT', '512M' );.Skip the old php_value memory_limit line in .htaccess unless your host supports it; on many servers it causes an instant 500 error. Never edit core files such as default-constants.php, because updates overwrite them. WordPress’s own guide warns that a higher limit can hide a deeper problem, which the next section tackles.
Quick Answer: If the error returns at 256 MB or more, something is using far more memory than it should. Use the file path in the error to find the plugin, deactivate it, and test again. If no plugin is named, switch to a default theme, then check image sizes, imports and database size.
On a staging copy, or during a quiet hour, deactivate plugins one at a time. If WP Admin is down, rename the plugin’s folder in wp-content/plugins to switch it off. Turning on WordPress’s debug log records the full error with its file path. Match what you see to this table:
| Where it appears | Likely culprit | Next step |
|---|---|---|
| Every page, right after an update | The plugin or theme just updated | Roll back to the previous version and report it to the developer |
| Only in the page builder editor | Builder plus too many add-on widget packs | Remove unused add-ons; raise WP_MAX_MEMORY_LIMIT |
| When uploading photos | Huge phone or camera images being resized | Resize to about 2,000 px wide before uploading |
| During product import or export | Too many rows processed in one go | Split the CSV into smaller batches |
| On checkout or cart pages | A shipping, payment or discount plugin | Test each checkout add-on on staging |
| Randomly, getting worse over time | Bloated database or autoloaded options | Clean old logs, revisions and leftover plugin data |
Source: Compiled by ZenWeb from the WordPress Advanced Administration Handbook and Malaysian client site repairs, October 2026.
On a shop, a WordPress memory exhausted error costs sales fastest. After the fix, check for orders stuck on pending payment, a missing add to cart button, shipping not showing at checkout and order emails not sending.
Quick Answer: Editing wp-config.php takes about 10 minutes. Changing PHP settings in your hosting panel takes about 15 minutes. A host support ticket usually takes a few hours to one working day. Tracking down a faulty plugin or cleaning a database can take a few hours to two days.
| Fix | Typical time |
|---|---|
| Add WP_MEMORY_LIMIT to wp-config.php | 10 min |
| Raise memory_limit in hosting panel | 15 min |
| Host raises a capped limit (support ticket) | 2 hours – 1 working day |
| Find and replace a faulty plugin | 1–6 hours |
| Database clean-up or move to a bigger plan | 1–2 working days |
Source: ZenWeb operational observations across Malaysian client WordPress sites, 2024–2026. Host support times vary by plan and are not guaranteed.
While the site is down, pause ads that send paid clicks to broken pages. Shopping products linking to an error page can stop serving (see Google Shopping ads not showing), and if a Meta relaunch stalls, see our fix for an ad set that can’t be published.
Is your hosting the real bottleneck?
If your plan caps memory at 128 MB, no wp-config edit will save a busy shop. Check our web design and maintenance packages →
Quick Answer: Keep plugins lean, resize images before upload, run big imports in batches, and clean the database every few months. Update one plugin at a time with a backup. Choose hosting with at least 256 MB of PHP memory if you run WooCommerce or a page builder.
Preventing a repeat WordPress memory exhausted error is mostly habit. These are the routines we use on sites we maintain:
If you would rather someone else watched this, our guide to website maintenance in Malaysia explains what a proper plan covers. Keeping plugins current is also part of WordPress website security.
Quick Answer: Call for help when the error persists at 256 MB or more, when you cannot find the plugin responsible, when your host refuses to raise the cap, or when checkout is affected. Also call if you see other errors alongside it, because those can point to a deeper server or security issue.
Escalate if you see any of these:
ZenWeb is a Google Partner agency that has worked with 500+ Malaysian businesses. Our web design services cover building and maintaining WordPress sites, so we can find the memory hog and size your hosting so the error stays away. Host support queues are outside our control, but we will manage that ticket for you.
A WordPress memory exhausted error means PHP hit its ceiling. Read the bytes in the message, raise WP_MEMORY_LIMIT to 256M in wp-config.php, and raise PHP’s memory_limit in your hosting panel if needed. If the error returns, use the file path to find the plugin, upload or task behind it, then keep it away with lean plugins, smaller images and hosting sized for your site. Seeing “page not found” instead? Read what a 404 error is. For more help, visit the ZenWeb home page.
Yes. 256 MB is a common, sensible limit for business sites running WooCommerce or a page builder. It is a ceiling, not a reservation, so a page that needs 60 MB still uses only 60 MB. Going far above 512 MB usually hides a faulty plugin rather than fixing anything.
Usually because the server’s PHP memory_limit is lower than what you asked for, and WordPress cannot go above it. Check Tools > Site Health > Info > Server. Also make sure the line sits above “That’s all, stop editing!”, not below it.
No. The limit only sets the maximum one request may use. It does not make pages heavier. Speed depends on what your plugins and theme actually do, so a slow site needs a performance review, not a lower limit.
A short outage is unlikely to have a lasting effect. If pages return errors for days, Google may crawl less and drop affected pages until they recover. Fix the error quickly, then check Search Console for crawl errors on your key pages.
Cite this page: ZenWeb (2026). WordPress Memory Limit Exhausted? How to Fix the Error. https://zenweb.my/blog/wordpress-memory-limit-exhausted/
You may quote our data with this credit and a link. See our Terms of Use.
Still seeing “allowed memory size exhausted”?
Send us the full error message and what you were doing when it appeared. We will find what is using the memory, fix it and make sure your hosting can handle your site.
Get A Free Proposal
Complete the form and our team will contact you to discuss your goals. Let’s grow your business.
Chat with us on WhatsApp
Tell us a little about what you need. We'll open WhatsApp with your message ready to send.