When a WordPress site runs out of memory, pages may load slowly, dashboard tasks can fail, or visitors may see a message such as “Allowed memory size exhausted.” The WordPress memory limit helps determine how much memory PHP can use while processing a request for your website. Understanding this setting can help you diagnose errors, run demanding plugins, and keep your site reliable.
In this guide, you’ll learn what the WordPress memory limit means, how it differs from your PHP memory limit, how to check it, and what to do if your site needs more memory.
What Is the WordPress Memory Limit?
The WordPress memory limit is the amount of server memory that PHP is allowed to use while running WordPress. PHP is the programming language that powers WordPress and executes tasks such as loading a page, processing a form, saving a post, or running a plugin.
Memory is working space for those tasks. WordPress, its theme, and its plugins use memory to load code and handle data. A simple page may need relatively little, while an online store, large import, image-processing task, or complex page-builder layout may need considerably more.
The limit is usually shown in megabytes (MB), such as 128M or 256M. It is not the same as the amount of storage space on your hosting account. Storage holds files and databases; memory is used temporarily while the server runs a request.
If a request needs more memory than PHP is permitted to use, PHP may stop the process. Depending on the situation, you might see a fatal error, a blank page, a failed update, or an error in your hosting or WordPress logs.
WordPress Memory Limit vs. PHP Memory Limit
These two settings are related, but they are not identical. The PHP memory_limit is a server-level setting that sets the maximum memory a single PHP process can use. WordPress also defines memory-related constants that tell it what memory level to request for different parts of the site.
The main WordPress constant is WP_MEMORY_LIMIT. It is intended to set the memory limit for ordinary WordPress operations, such as loading the public-facing website. WP_MAX_MEMORY_LIMIT is used for higher-memory tasks, particularly some administration operations. These tasks can include working in the dashboard, updating software, or processing media.
WordPress can request a higher limit through these constants only if the PHP configuration and hosting environment allow it. A WordPress setting cannot override a stricter server-level cap. For example, setting WP_MEMORY_LIMIT to 512M will not give a site 512 MB if the host has capped PHP at 256 MB.
The effective limit can therefore depend on your WordPress configuration, PHP configuration, hosting plan, and the specific request being processed. Some hosts also apply separate limits to individual websites or accounts.
What Is a Normal WordPress Memory Limit?
There is no single memory limit that is ideal for every WordPress site. The amount you need depends on your theme, plugins, content, traffic, and the jobs your site performs. A basic blog may run comfortably with less memory than a large WooCommerce store or a site that handles substantial image or data processing.
WordPress has commonly used default values for its memory constants, but the values a site actually receives can vary with WordPress settings and server configuration. Hosting providers may set their own PHP defaults and maximums, too. Check your site and hosting account instead of assuming that a default value applies.
For many sites, a PHP memory limit of 128 MB or 256 MB is a practical starting point. More demanding sites may need more, while a small site may not benefit from a higher limit at all. Increasing memory is not automatically a performance improvement: it raises the amount PHP is permitted to use, but does not make inefficient code run faster.
Signs Your Site May Be Running Out of Memory
A memory problem can appear in different ways. Some signs are obvious; others can look like a plugin, theme, or hosting issue. Look for patterns such as:
- A message that says “Allowed memory size of X bytes exhausted.”
- A blank or partially loaded page, sometimes called a white screen of death.
- Errors when saving a post, uploading media, or opening a dashboard page.
- Failed plugin, theme, or WordPress updates.
- Problems importing products, posts, or other large data sets.
- A task that fails only when a particular plugin or feature is active.
These symptoms do not prove that the memory limit is too low. A coding error, incompatible plugin, PHP version issue, or server resource restriction may produce similar behavior. If the error log identifies a specific file or plugin, investigate that clue before changing settings.
How to Check Your WordPress Memory Limit
Start in your WordPress dashboard. Go to Tools > Site Health and open the Info tab. The Server section may show the PHP memory limit and other details about your environment. The exact information displayed can vary depending on your WordPress and PHP versions.
You can also check the dashboard’s Site Health status for warnings about available PHP memory. If you cannot access the dashboard, or you need a more detailed view, check your hosting control panel or ask your hosting provider to confirm the PHP memory_limit currently applied to your site.
Some hosts let you view or change PHP settings through a control panel. You can also inspect server configuration with a temporary diagnostic file, but take care: a publicly accessible PHP information page can expose details about your server. Remove any diagnostic file as soon as you finish, or ask your host to check the value for you.
How to Increase the WordPress Memory Limit
Before editing configuration files, make a backup of your site and confirm that your hosting plan supports the limit you want. If you are unsure where PHP settings are managed, contact your host. A server-level setting may override a change made inside WordPress.
1. Use your hosting control panel. Many hosting providers offer a PHP settings page where you can select a PHP version and adjust memory_limit. The location and available options depend on the host. If there is a maximum value, use a supported setting rather than trying to exceed it.
2. Edit wp-config.php. If your host permits WordPress to request more memory, you may be able to add or update memory constants in the wp-config.php file. This file is in the main WordPress directory. Add the lines before the comment that says “That’s all, stop editing!” or its equivalent:
define( 'WP_MEMORY_LIMIT', '256M' );define( 'WP_MAX_MEMORY_LIMIT', '256M' );
Check the file first. If a constant is already defined, edit its existing value rather than defining it a second time. The values above are examples, not a universal recommendation. Use a limit appropriate for your site and the cap set by your provider.
3. Change PHP configuration if your host allows it. Some server setups let you set memory_limit in a PHP configuration file, such as php.ini or .user.ini. The correct file and syntax depend on the server. A setting in .htaccess works only on certain configurations and can cause a server error if unsupported, so do not add it unless your host confirms it is appropriate.
After making a change, revisit Site Health or ask your provider to verify the effective value. If the limit does not change, PHP or hosting configuration may be taking precedence over the WordPress constant.
Why Increasing Memory May Not Fix the Problem
A higher limit can help when a legitimate WordPress task needs more working memory, but it does not resolve every error. If a plugin has a memory leak, a theme runs inefficient code, or a process attempts to handle an unusually large file, simply raising the cap may postpone the failure rather than solve its cause.
When an error begins after installing or updating a plugin, test the site with that plugin disabled if it is safe to do so. You can also switch temporarily to a default theme in a staging environment. Review error logs, update outdated software, and check whether the issue occurs during a particular action, such as importing a file or generating thumbnails.
If the site regularly reaches its memory limit despite efficient software, it may need a hosting plan with more resources. A higher PHP limit does not guarantee that the account has enough total server memory, CPU capacity, or other resources to support every request.
Best Practices for Managing WordPress Memory
- Use a current, WordPress-compatible PHP version recommended by your host.
- Keep WordPress core, themes, and plugins updated, and remove software you no longer use.
- Choose reputable plugins and avoid installing several tools that perform the same job.
- Test major changes on a staging site before applying them to a live website.
- Monitor error logs and investigate repeated memory warnings rather than ignoring them.
- Ask your host about account limits before increasing PHP memory or changing server settings.
Frequently Asked Questions
Can I set the WordPress memory limit as high as I want?
No. WordPress can request a memory amount, but the server’s PHP configuration and hosting limits determine what is actually available. A value above those limits may be ignored.
Will more memory make my website faster?
Not necessarily. More memory can prevent failures during memory-intensive tasks, but it does not directly improve code efficiency or page speed. Caching, optimized images, and well-maintained plugins may matter more for performance.
Is the memory limit the same as disk space?
No. Disk space stores your website files, uploads, and database backups. The memory limit controls how much working memory PHP can use while processing a request.
Should I edit wp-config.php myself?
Only if you are comfortable working with WordPress files and have a recent backup. A syntax mistake can make the site unavailable. When in doubt, use your host’s settings interface or request help from support.
Conclusion
The WordPress memory limit controls how much memory PHP can use while handling WordPress requests. It can affect page loading, dashboard tasks, updates, uploads, and plugin features, but the effective value is governed by both WordPress and your server configuration.
Check the current limit in Site Health or with your hosting provider before changing anything. If memory errors occur, identify which task or component is responsible, then increase the limit only when needed and within your host’s supported range. Combining an appropriate memory setting with reliable plugins, current software, and suitable hosting is the best way to keep your WordPress site stable.