Speed & performance · Explainer
What Is the WordPress Memory Limit? Explained

Short answer
The WordPress memory limit is the most PHP memory a single request on your site may use. WordPress requests 40MB by default for single sites and up to 256MB for admin tasks, but your host's PHP memory_limit sets the real ceiling.
Key takeaways
- The memory limit is a per-request ceiling, not your plan's total memory.
- WordPress defaults to 40M for single sites, 64M for multisite and 256M for admin tasks.
- Your host's PHP memory_limit caps what WordPress can set.
- Most sites run well with 128M to 256M; stores and builders often need more.
- A higher limit hides problems; find what is using memory too.
What is the WordPress memory limit?
The WordPress memory limit is the maximum amount of server memory a single PHP request on your site may use, set by WordPress through the WP_MEMORY_LIMIT constant but capped by your host's PHP settings.
Every time someone loads a page, PHP runs WordPress, your theme and your plugins. All of that needs memory while it works.
The memory limit stops one request from using too much and starving everything else on the server. When a request hits the limit, PHP stops it and shows a fatal error.
The limit is not the total memory of your hosting plan. It is a per-request ceiling.
What is the default WordPress memory limit?
By default WordPress asks for 40MB on a single site and 64MB on multisite for front-end requests, and up to 256MB for admin tasks, but only if PHP allows that much.
WordPress uses two constants:
| Constant | What it controls | Default |
|---|---|---|
| WP_MEMORY_LIMIT | Memory for normal page requests | 40M single site, 64M multisite |
| WP_MAX_MEMORY_LIMIT | Memory for admin and heavy tasks | 256M |
| PHP memory_limit | Hard ceiling set by the server | Set by your host |
These defaults are minimums WordPress tries to apply. If your server's PHP limit is already higher, WordPress does not lower it.
The wp-config.php documentation on memory describes both constants and how to change them.
How is the WordPress limit different from the PHP memory limit?
PHP's memory_limit is the server-level ceiling, while WP_MEMORY_LIMIT is what WordPress requests within it; WordPress can raise its own value only up to what the server permits.
PHP sets memory_limit in its configuration file, php.ini. The PHP manual entry for memory_limit explains the setting.
WordPress then tries to set its own limit when it loads. If the host blocks changes to memory_limit, or sets a lower hard cap, WordPress cannot go above it.
This is why adding a big number to wp-config.php sometimes changes nothing. The host's cap wins.
On shared hosting, the PHP limit is often fixed per plan. On a VPS or managed host, you or support can usually raise it.
Why does the memory limit matter?
A limit that is too low causes fatal errors, blank pages and failed admin tasks, while a sensible limit keeps one bad request from slowing down or crashing the server.
The classic symptom is this message: Allowed memory size of X bytes exhausted. Our explainer on what causes the allowed memory size exhausted error covers the triggers.
Low memory can also show as:
- A white screen with no error message
- Image uploads or resizing that fail
- Plugin or theme updates that stop halfway
- Imports and exports that time out
- Page builders that never finish loading
Raising the limit fixes many of these. But if one plugin keeps using huge amounts, more memory only hides the problem.
How much memory does a WordPress site need?
Most small WordPress sites run fine with 128MB to 256MB per request, while WooCommerce stores, page builders and large imports often benefit from 256MB or more.
There is no single right number. It depends on how much code runs on each request.
| Site type | Typical sensible limit |
|---|---|
| Simple blog, few plugins | 128M |
| Business site with a page builder | 256M |
| WooCommerce store | 256M or more |
| Membership or LMS site | 256M to 512M |
| Large imports or migrations | Temporary higher limit |
These are common starting points, not rules. Your host may recommend different values for your plan.
The WordPress hosting requirements page lists the PHP and database versions WordPress expects, which also affect memory use.
How do I check my current memory limit?
Open Tools > Site Health > Info and look under the Server section for the PHP memory limit and under WordPress Constants for WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT.
Site Health shows both the server value and what WordPress has set. If they differ, the lower effective value usually applies.
Your host's control panel may also show the PHP limit in a PHP settings or PHP options screen.
Our step-by-step guide on how to check the WordPress memory limit shows every method, including a quick phpinfo check.
How do I increase the WordPress memory limit?
Add a define line for WP_MEMORY_LIMIT to wp-config.php, and if that has no effect, raise PHP's memory_limit through your host's PHP settings, php.ini, .htaccess or support.
The most common change is one line, placed above the line that says That's all, stop editing!:
define( 'WP_MEMORY_LIMIT', '256M' );
If admin tasks also fail, raise the admin limit too:
define( 'WP_MAX_MEMORY_LIMIT', '512M' );
If Site Health still shows the old value, the server is blocking the change. Use your host's PHP settings screen, or ask support to raise memory_limit.
Our full guide on how to increase the PHP memory limit in WordPress covers each method, including php.ini and .htaccess.
If you use the command line, WP-CLI can add the same constant with its config set command, which avoids manual typos in the file.
Always back up wp-config.php before editing. A typo in that file can take the whole site down.
Is a higher memory limit always better?
No, a very high limit lets a buggy plugin use far more memory before it fails, which can slow the server, and it does not make a well-built site any faster.
Memory limits are a safety net. They do not speed up pages on their own.
Setting 1GB or more on shared hosting can backfire. Hosts often have total memory caps per account, and one greedy request can affect every other visitor.
Raise the limit enough to stop errors, then look at what is using memory. That approach fixes the cause, not just the symptom.
What uses the most memory in WordPress?
Heavy plugins, page builders, large WooCommerce catalogs, image processing and imports or backups use the most memory, and badly written code can use far more than it should.
Common memory-hungry tasks include:
- Generating image sizes after uploads
- Running backup or migration plugins
- Building complex pages in a visual builder
- Processing large product imports or exports
- Running security scans
To find the culprit, deactivate plugins one at a time and watch whether errors stop. Our guide on fixing a plugin conflict shows a safe way to do that.
Developers can use the Query Monitor plugin to see peak memory use for each page load.
Does the PHP version affect memory use?
Yes, newer PHP versions generally run WordPress more efficiently than old ones, so updating PHP can reduce memory pressure as well as improve speed.
Old PHP versions are also no longer patched for security. Running them is a risk on its own.
Check which version your host offers and update when your theme and plugins support it. Our guide on how to update the PHP version in WordPress explains how to test the change first.
Frequently asked questions
What does 256M mean in the WordPress memory limit?
It means 256 megabytes of memory per PHP request. Each page load or admin action can use up to that amount before PHP stops it with a fatal error. It is not the total memory available to your whole site.
Why does my memory limit not change after editing wp-config.php?
Your host's PHP memory_limit is lower and cannot be overridden from WordPress. Raise it in your host's PHP settings, in php.ini if you have access, or ask support to increase it for your account.
Is 128MB enough for WordPress?
For a simple blog or brochure site with a few light plugins, 128MB is usually enough. Page builders, WooCommerce, membership plugins and large imports often need 256MB or more to avoid memory errors.
Can increasing the memory limit break my site?
Raising the limit itself rarely breaks anything, but a typo in wp-config.php can take the site offline. Back up the file first, add the line carefully and check Site Health afterwards to confirm the new value.
What is WP_MAX_MEMORY_LIMIT used for?
It sets the memory WordPress allows for admin screens and heavy tasks such as image processing and updates. It defaults to 256MB, and you can raise it separately if admin actions fail while the front end works fine.
Sources
- Editing wp-config.php WordPress Developer Resources
- Core php.ini directives: memory_limit PHP.net
- Requirements WordPress.org
- Query Monitor WordPress.org
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


