One of the most common technical issues WordPress site owners face is the WordPress memory exhausted error, often shown as the "Allowed memory size exhausted" message.
This usually happens when the site hits its WordPress memory limit, a preset cap on how much memory PHP scripts can use while running your site.
One user, on the official WordPress.org support forum, reported over 200 memory exhaustion errors in a single day. It was all tied to reaching a 256 MB memory cap during normal site usage. The plugin team advised raising the PHP memory limit to stop interruptions.

Source: WordPress Memory Limit Exhausted
Such an error seems overwhelming. But the best thing is, you do not need to become a developer to fix it. Increasing your memory limit is one of the simplest ways to improve your site’s stability and performance. A small configuration change can help avoid site crashes, allow large media uploads, and fix plugin errors.
In this blog, we’ll talk about how to increase the WordPress memory limit step-by-step in 2026. It will ensure your site runs faster, smoother, and without those annoying memory-related issues.
First, let’s start by understanding what the WordPress memory limit is.
wp-config.php: Add define('WP_MEMORY_LIMIT', '256M');php.ini or .htaccess if neededThe WordPress memory limit is the maximum amount of memory your website can use to run PHP scripts. WordPress uses a language called PHP to load your site, run themes, and handle plugins. All of these actions need server memory to work properly.
You may further face hassles such as slow site loading, broken plugins, or 404 errors. Additionally, your site might display an error message like “Allowed memory size exhausted” or a general “There has been a critical error on this website.”
This occurs when any of your tasks tries to utilize more space than it is already allocated. As a result, PHP simply stops operating, and your site can crash.
The common reasons behind your WordPress memory limit exhaustion are as follows:
Some plugins or themes run complex database tasks that use a lot of memory, especially when the data isn’t optimized.
Older versions of PHP use memory less efficiently. Newer versions like PHP 8.x are better at handling memory. You can hire a PHP developer to upgrade your PHP version with ease and optimize your site.
Some plugins and themes are equipped with too many features that require proper functioning.
More visitors mean more work for the server. WordPress builds pages for each user. It gradually increased the memory usage.
Uploading videos or large images causes short-term spikes in memory usage during the file processing.
Some plugins load extra data on every page unnecessarily, which adds to the memory load.
It’s good to check how much memory your site is currently using before you jump into increasing the memory limit.

2. Click on the Info tab at the top.

Look for the line that says PHP memory limit. This shows the current limit set on your server.

You can install a plugin like Server Info or WP-ServerInfo. These show the PHP memory
limit, along with other server details on your dashboard.
Create a file named phpinfo.php in your root directory. Add this line inside it:

The next thing you need to do is open the file in your browser (e.g., yourdomain.com/phpinfo.php). Upon opening the file, you’ll see a page with all your PHP settings, including the memory limit.
Besides all this, backing up your site is essential before making any changes. It saves you from potential issues or errors during the update.
Start by backing up these two things:
Here are some proven tricks for how to increase the WordPress memory limit and avoid common errors. The first method is commonly used and mostly recommended.
This is the easiest and most compatible way.
Steps:
Now, save and upload the file back to your server.
If editing wp-config.php doesn’t work, you can try updating the php.ini file.
Steps:
Remember, not all shared hosting plans allow access to php.ini.
This method works for sites hosted on Apache servers that allow overrides.
Steps:
You can try these options to avoid manual edits.
You can contact the hosting provider and ask them to unlock the memory limits on the server level if none of the above methods work.
What you can do:
Many website owners think the WordPress memory limit and PHP memory limit are the same thing. They are not.
Understanding the difference can save you a lot of time when troubleshooting memory errors.
The WordPress memory limit is the amount of memory WordPress is allowed to use.
The PHP memory limit is the maximum amount of memory your hosting server allows PHP to use.
Think of it this way.
WordPress can request more memory, but the server makes the final decision.
For example, you may add a 256MB memory limit in your wp-config.php file. However, if your hosting account only allows 128MB through PHP settings, WordPress will still be limited to 128MB.
This is one of the most common reasons memory limit changes do not work.
Example:
Let’s say your website has:
Even though WordPress is asking for 256MB, the server will stop it at 128MB. As a result, you may continue seeing memory-related errors.
You can view your PHP memory limit through:
If the PHP memory limit is lower than the value you want to set in WordPress, you may need to update your server settings or contact your hosting provider.
Before increasing the WordPress memory limit, always check the PHP memory limit first.
Many site owners spend time editing configuration files only to discover their hosting provider has set a lower server-level limit.
Knowing both values helps you avoid confusion and makes troubleshooting much easier.
There are chances that you might still face issues even after you increase the WordPress memory limit. Well, you can troubleshoot the issues with the help of the practices shared below.
Setting the high limit directly is not the right choice and is not allowed by your host.
Also, you should check with your hosting provider to know the maximum allowed memory limit.
While some resource-intensive themes or plugins (like WooCommerce, Elementor, or WPML) may benefit from 512M or higher, it’s usually overkill for standard blogs or portfolios. Use high values only if:
You should use a high memory limit only if:
Memory issues often signal something deeper than just low limits. Try the following:
If your site crashes or starts showing critical errors after editing wp-config.php, .htaccess, or php.ini, don’t panic.
Also, you can hire a WordPress developer to manage backups and updates safely.
Running into memory limit errors in WordPress is common. But the good news is, it’s usually easy to fix. Whether you change a few lines in a file or ask your host for help, these steps can get your site back on track.
Also, if you’re not tech savvy or don’t have time to resolve such hassles, Digital4design is here to help. We offer WordPress development services, ongoing WordPress maintenance services, and expert support for websites experiencing memory errors, plugin conflicts, or performance issues.
WordPress sets the memory limit to 40MB for single-site and 64MB for multisite installations by default. However, most modern plugins and themes need at least 128MB to 256MB for smooth functioning.
It can help. But you should also look into caching, image optimization, and hosting quality for overall speed.
Some hosting providers cap the memory at the server level. You’ll need to contact your hosting provider and ask them to increase it for you.
Yes. Digital4design offers expert WordPress development services and can help you fix memory issues, speed up your site, and keep everything running hassle-free.
Curious about AI-powered website builders? Explore Framer’s key features, benefits, pros and cons, design flexibility, and ease of use. Learn when Framer may be a better choice than traditional website builders for creating modern, professional websites.
Craft CMS is a popular choice for custom websites because it offers greater control over design and content. Its flexibility and easy management make it ideal for creating unique, high-performing websites.
Learn how GoHighLevel Conversation AI helps businesses automate customer communication, improve lead response speed, manage workflows, schedule appointments, and simplify CRM-based conversations.
Think of your website like a car. You can build a custom car from scratch and tailor every part to match your specific needs and requirements. From the design and features to performance and functionality, everything can be built around what works best for your business.
I always find it a bit tricky when WordPress memory limits come into play. It’s great to see that there are simple ways to adjust this without needing deep technical knowledge. Do you have any thoughts on how these changes might affect site performance in the long term?