PHP Configuration
Fixing 'Allowed Memory Size Exhausted': How to Increase the WordPress Memory Limit
A blank white screen and a memory exhausted error usually mean WordPress hit its PHP memory ceiling. Raise the limit through the method your hosting environment actually allows, and the error disappears for good.
256M
Typical raised memory limit for WordPress
NVMe
Pure NVMe SSD storage on every plan
24/7
Human support for PHP configuration
30-Day
Money-back guarantee
In short
To increase the WordPress memory limit, raise the WP_MEMORY_LIMIT value in wp-config.php (for example, define('WP_MEMORY_LIMIT', '256M');), then increase the PHP-level memory_limit through php.ini or an .htaccess directive if the wp-config change alone doesn't clear the 'Allowed memory size exhausted' error. The correct fix depends on which layer is actually enforcing the cap, so check both the WordPress setting and the server's PHP configuration.
A fatal error reading 'Allowed memory size of X bytes exhausted' stops a page cold, sometimes replacing the entire dashboard with a blank white screen. It happens when a plugin, theme, or media file asks PHP for more memory than the current limit allows, and PHP kills the process rather than let it run unbounded.
WordPress actually sets two separate memory limits: one inside wp-config.php that applies just to WordPress itself, and the underlying PHP memory_limit set at the server level, which caps every PHP process running on the account. Raising only one of the two often leaves the error in place, which is why this needs a layered approach rather than a single edit.
Raising the Limit in wp-config.php
Open wp-config.php in the site's root folder and add define('WP_MEMORY_LIMIT', '256M'); above the line that reads /* That's all, stop editing! */. This raises the ceiling WordPress itself requests, which is often enough for a plugin-heavy site or an import job that was hitting the default limit.
For the admin dashboard specifically, WP_MAX_MEMORY_LIMIT controls a separate, usually higher ceiling used for import tools, bulk edits, and the block editor. Setting both values, for example 256M for WP_MEMORY_LIMIT and 512M for WP_MAX_MEMORY_LIMIT, covers both the front end and the heavier admin-side operations in one edit.
Raising the PHP Memory Limit at the Server Level
If the error persists after editing wp-config.php, the underlying PHP memory_limit set by the hosting environment is the actual bottleneck, since it caps every process regardless of what WordPress asks for. On a cPanel-style panel, this is usually adjustable through a PHP configuration or 'Select PHP Version' option without needing to touch a file directly.
Where direct file access is available, adding php_value memory_limit 256M to an .htaccess file, or editing php.ini directly if the account has one, raises the same ceiling. Because server-level settings vary by hosting environment, confirming which method applies avoids editing a file the server configuration will simply ignore.
Finding What's Actually Consuming the Memory
Raising the limit fixes the symptom, but a site that keeps needing higher and higher ceilings usually has a specific cause: a poorly coded plugin, an oversized image processed in bulk, or a report or import running with no chunking. Deactivating plugins one at a time and watching for when the error disappears usually isolates the culprit within a few minutes.
The WP_DEBUG_LOG setting, turned on in wp-config.php alongside WP_DEBUG, writes fatal errors including the exact file and line that triggered the memory exhaustion to a debug.log file. That detail points straight at the plugin or theme function responsible instead of leaving it to trial and error.
Confirming the New Limit Took Effect
After making changes, create a file with <?php phpinfo(); ?> or check Tools > Site Health > Info inside WordPress, which lists the current PHP memory_limit and the WordPress memory constants side by side. If the number shown doesn't match the edit just made, the change was applied at the wrong layer, or a caching plugin is serving a stale version of the page.
Once the limit is confirmed and the error stops appearing, keep an eye on plugin updates and any new import or backup tool added later, since those are the most common reasons a previously fine memory limit becomes too low again months down the line.

Hosting With Room to Raise the Limit When You Need To
Some hosting environments lock the PHP memory_limit at a low number with no way to adjust it, which turns every memory error into a support ticket that goes nowhere. A panel that lets an account raise its own PHP settings means this fix takes minutes instead of days.
Pure NVMe SSD storage and LiteSpeed keep the server itself fast, so a higher memory limit doesn't come at the cost of slower page loads, and 24/7 human support is available if a debug log needs a second pair of eyes to interpret.
- cPanel-style panel with adjustable PHP memory limits
- Pure NVMe SSD and LiteSpeed for fast processing at any limit
- Free managed migration that carries PHP settings over correctly
- 24/7 human support for reading debug logs and PHP errors
Why Hosting Cheap
What you get
Adjustable PHP Settings
Raise the memory limit and other PHP values directly through the control panel without waiting on a support ticket.
NVMe SSD and LiteSpeed
Fast storage and caching keep pages responsive even after the memory ceiling is raised for heavier plugins.
24/7 Human Support
Real people can help trace a memory exhausted error back to the plugin or import job causing it.
Free Managed Migration
Moving a site over includes carrying existing PHP and wp-config settings across correctly.
Daily Backups
A recent backup makes it safe to test plugin changes while isolating what's driving up memory use.
30-Day Money-Back Guarantee
Test a higher memory limit and a heavier plugin stack risk-free while confirming everything runs smoothly.
How It Works
Get set up in a few steps
Edit wp-config.php
Add WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT constants set to a higher value such as 256M.
Raise the server-level PHP limit
Use the control panel's PHP settings, or an .htaccess/php.ini edit, to raise memory_limit itself.
Find the root cause
Deactivate plugins one at a time or check the debug log to see what's actually driving memory use up.
Included
Everything you need, on every plan
- Add WP_MEMORY_LIMIT to wp-config.php
- Add WP_MAX_MEMORY_LIMIT for admin-side operations
- Check the control panel for a PHP memory_limit setting
- Try an .htaccess php_value edit if direct panel access isn't available
- Turn on WP_DEBUG_LOG to capture the exact error source
- Deactivate plugins one at a time to isolate the cause
- Confirm the new limit in Tools > Site Health > Info
- Recheck after any major plugin update
FAQ
Frequently asked questions
What does 'Allowed memory size exhausted' actually mean?
It means a PHP process tried to use more memory than the current limit allows, and PHP stopped it rather than let usage run unchecked. The number in the error message is the limit that was hit, not the amount that was needed.
Is 256M enough for most WordPress sites?
For most sites running a moderate number of plugins, yes. Larger stores, sites with many active plugins, or heavy import and backup tools sometimes need 512M, though raising it further without finding the root cause just delays the same error.
Why did the error come back after I raised WP_MEMORY_LIMIT?
The wp-config.php constant can't exceed the PHP-level memory_limit set by the server. If the server cap is still lower than the WordPress setting, the server limit wins, so both need to be raised together.
Can a hosting plan restrict how high I can raise the memory limit?
Some environments cap PHP memory_limit and don't expose a setting to change it, which makes this error unfixable from the WordPress side alone. A control panel with adjustable PHP settings avoids that dead end.
Does raising the memory limit slow down the site?
No, a higher limit is just a ceiling; a process only uses the memory it actually needs. Performance depends on server resources like CPU and storage speed, not on how high the memory_limit number is set.
How do I know which plugin is causing the memory error?
Turn on WP_DEBUG_LOG in wp-config.php to write the exact file and function to debug.log, or deactivate plugins one at a time and reload the page after each to see when the error stops.
Hosting That Lets You Raise the Limit Yourself
Get a control panel with adjustable PHP settings, NVMe storage, and 24/7 support for anything memory-related.
Get Started