Trying to upload a plugin or theme and suddenly hit with an error saying “Allowed memory size exhausted”? Don’t panic you’re not alone. This issue is more common than you might think and usually appears when WordPress doesn’t have enough memory to complete a task. In simple terms, your website is running out of allocated resources, causing it to fail silently in the background. The good news? A proper WordPress Memory Limit Error Fix is easy to apply, even if you’re not a developer, and can get your site back to working smoothly in minutes.
The WordPress memory limit error can appear during everyday tasks like uploading images, installing themes, activating plugins, or updating your site especially when working with modern WordPress Block Themes, which often rely on dynamic layouts and advanced styling features. Instead of completing the task, your site may freeze, display a blank screen, or show that dreaded memory warning.
But here's the good news: you don’t need to be a developer to fix it.
You don’t even need to know how PHP works. What you do need is this guide made for beginners who want to get their site running smoothly again.
By the time you reach the end, you’ll understand:
- Why the memory error occurs
- How to safely increase your WordPress memory limit
- And how to prevent this issue from coming back in the future
So, grab a cup of chai or coffee and let’s dive in, step by step, into solving the WordPress memory limit error like a pro.
What is the WordPress Memory Limit Error?
Think of WordPress as a machine that runs on fuel except in this case, the fuel is memory. More specifically, it’s PHP memory, which works behind the scenes to power your themes, plugins, images, forms, and nearly every action performed by visitors or administrators. When this fuel runs low, errors start to appear, making a WordPress Memory Limit Error Fix essential for keeping your site running smoothly and efficiently.
Here’s the catch: that memory isn’t unlimited. Your hosting provider allocates a fixed amount of PHP memory to your site. When your website exceeds that limit, it doesn’t just slow down it crashes. That’s why following smart WordPress Optimization Tips, such as using lightweight plugins and optimizing server resources, is essential to keep your site running smoothly and error-free.
You might see an error message like:
“Fatal error: Allowed memory size of xxxxx bytes exhausted in /your-wordpress-folder…”
Or your site may just refuse to finish loading an action. This error usually shows up during:
- Installing or updating a plugin or theme
- Uploading large media files (like images or videos)
- Running import/export or backup tools
- Performing operations after a major WordPress update
What Causes the Memory Limit Error in WordPress?
Here’s why your site might be running out of memory and what could be eating up the resources:
-
Default PHP Memory Limit Is Too Low
Most hosting companies give WordPress a very low memory limit to start with sometimes just 32MB or 64MB. That’s barely enough for anything beyond a basic blog.
-
Heavy or Poorly Coded Plugins
Some plugins are memory hogs. Especially if they’re outdated, badly coded, or try to run too many things at once. A single bulky plugin can spike your memory usage instantly.
-
Complex or Feature-Rich Themes
Got a fancy theme with tons of animations, sliders, or page builders? That adds weight. Heavy themes can demand more memory than your site has to give. -
Shared Hosting Limitations
If you’re on shared hosting, your memory is being rationed between multiple websites. So even if your own site is light, a neighbor’s surge could impact you. -
Sudden Spikes in Activity
Doing bulk image uploads? Importing content from another site? Updating everything at once? These big operations need more memory and they can push your site over the edge.
How to Check Your Current PHP Memory Limit
Before fixing anything, let’s figure out how much memory your WordPress site actually has. You’ve got a few beginner-friendly ways to check:
Method 1: Use a Plugin (Quick & Easy)
Install a plugin like Site Health Info or WP Memory Limit. Once installed:

- Go to your WordPress dashboard
- Navigate to Tools → Site Health → Info
- Expand the Server or WordPress Constants section
- Look for a line that says WP Memory Limit or PHP memory_limit
Method 2: Check via Hosting Dashboard (cPanel)
If your hosting uses cPanel, follow these steps

- Log in to your hosting cPanel
- Find and open PHP Info (under "Software" or "Advanced")
- On the page that opens, press Ctrl+F (Windows) or Cmd+F (Mac)
- Search for memory_limit
You’ll see a value like 128M or 256M that’s your current PHP memory limit.
Method 3: Use a phpinfo.php File
If you're feeling brave or want full control, try this:

- Open a text editor and paste this code:
<?php
phpinfo();
?>
- Save the file as phpinfo.php
- Upload it to your WordPress root directory using FTP or File Manager
- Visit yourdomain.com/phpinfo.php in your browser
- Use Ctrl+F or Cmd+F to search for memory_limit
Don't forget to delete the file after checking it exposes sensitive info about your server!
How to Fix WordPress Memory Limit Error (Step-by-Step)
Once you know your current limit, here’s how to fix or increase it. Try these one by one and stop once it works!
Method 1: Increase Memory Limit via wp-config.php
The simplest way for most users:
- Go to your WordPress root folder via FTP or File Manager
- Open wp-config.php
- Add the following line just before this comment: "That's all, stop editing! Happy publishing."
define( 'WP_MEMORY_LIMIT', '256M' );
This tells WordPress to use up to 256MB of memory a good number for most sites.
Method 2: Increase via php.ini (If You Have Access)
If your host lets you create or edit php.ini files:

- Go to your WordPress root directory
- Create a new file named php.ini (or edit the existing one)
- Add this line:
memory_limit = 256M
Some hosts require this file in multiple folders (like /wp-admin/) so if one doesn’t work, try duplicating it.
Method 3: Use .htaccess File (Apache Servers Only)
If you’re on an Apache server and .htaccess is available:

- Open your .htaccess file (in the root directory)
- Add this at the very top:
php_value memory_limit 256M
Heads-up: This method might not work on all hosts and if it’s not supported, it can crash your site temporarily. So use with caution, and back up your .htaccess first!
Method 4: Contact Your Hosting Provider
If you’re not comfortable editing files or nothing seems to work, just reach out to your host. Most support teams are used to this request.
Here’s a message you can copy-paste:
Hi, I’m getting a “memory limit exceeded” error on my WordPress site. Could you please increase the PHP memory limit to at least 256MB for my account? Thank you!
They’ll either do it for you or guide you through the process.
How Much Memory Should You Allocate?
Now that you know how to change your memory limit, the next question is how much is enough?
General PHP Memory Recommendations
The ideal memory limit depends on your website’s size, complexity, and purpose. Here’s a general guide:
- 128M is sufficient for simple blogs, portfolio sites, or informational pages with minimal plugins.
- 256M is recommended for eCommerce websites, membership portals, or sites using visual page builders and feature-heavy plugins.
- 512M or more is suitable for high-traffic websites, online courses, or advanced platforms with custom development.
Use Only What You Need
It may seem like a good idea to raise the memory limit as high as possible, but more isn’t always better. Every hosting server has its own restrictions, and increasing the limit beyond those boundaries may have little to no effect or could even lead to performance issues. For a reliable WordPress Memory Limit Error Fix, it’s important to strike the right balance rather than over-allocating resources.
After making changes, always monitor your site’s performance and resource usage. If problems persist, the root cause may not be memory at all. Inefficient plugins, low-quality hosting, or unoptimized code are often the real culprits behind recurring errors, even after applying a WordPress memory limit fix.
Preventing Memory Limit Issues in the Future
Fixing the issue is good. Avoiding it altogether is better. Here are a few habits and practices to help prevent memory limit errors going forward.
- Use Lightweight Plugins and Themes: Always choose well-coded plugins and themes that serve a specific purpose. Avoid overly complex tools that add unnecessary load to your server, especially when learning how to install plugins on WordPress and selecting the right ones for your site.
- Remove Unused Themes and Plugins: Even inactive plugins can affect performance and security. Regularly audit your website and delete anything you’re not actively using. This is an important best practice once you understand how to install plugins on WordPress efficiently.
- Optimize Your Database: Over time, your WordPress database accumulates overhead from post revisions, spam comments, and transient options. Use tools like WP-Optimize or Advanced Database Cleaner to keep your database clean, lightweight, and fast.
- Limit the Use of Bloated Page Builders: Page builders such as Elementor and WPBakery are powerful but resource-intensive. Use them only when necessary and ensure your hosting environment can handle the additional load.
- Monitor Site Performance: Install a performance monitoring plugin like Query Monitor to detect slow queries, memory-heavy plugins, or conflicts. Ongoing monitoring helps you identify issues early and maintain a smooth WordPress experience.
Conclusion
The WordPress memory limit error might look intimidating at first, but it’s actually one of the simplest issues to fix. It usually occurs when your website exceeds the default PHP memory allocated by your hosting server something that’s common on shared hosting plans or while using feature-rich plugins or a WordPress Theme Bundle with advanced customization options.
The good news? You don’t need to be a developer to resolve this issue. A proper WordPress Memory Limit Error Fix can be done by updating the wp-config.php file, adjusting the php.ini settings, or simply contacting your hosting provider for help. Each of these methods is beginner-friendly and easy to follow, even if you have limited technical experience.
Before making any changes, always create a complete backup of your website. This extra step ensures you can quickly restore your site if something doesn’t work as expected, keeping your WordPress website safe, stable, and stress-free.
Frequently Asked Questions
Q1. Is it safe to increase the WordPress memory limit?
Yes, it’s completely safe. Just make sure the value you set is supported by your hosting server.
Q2. What’s the ideal memory limit for a WooCommerce site?
For most WooCommerce stores, 256M is a good starting point. Larger stores with more traffic may need 512M or more.
Q3. Can plugins cause memory issues?
Yes. Heavy or poorly coded plugins can consume a large portion of your site’s memory, triggering errors.
Q4. Will increasing the memory limit improve performance?
Not directly. It won’t make your site faster, but it ensures smoother operation during complex tasks like imports, updates, or backups.
Q5. My changes didn’t work what should I do?
Start by clearing your site and browser cache. Then double-check file permissions. If the issue persists, contact your hosting provider and ask them to increase the PHP memory limit manually.