How to Fix “Allowed Memory Size of 134217728 Bytes Exhausted” Error in WordPress

Understanding the Error

If you’ve encountered this WordPress error:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 86016 bytes) in /home/devrumman/public_html/wp-includes/class-wpdb.php on line 2351” — don’t worry, it’s a common issue.
This means your WordPress site has run out of allocated PHP memory.


Why It Happens

By default, your hosting server allows a specific amount of memory for running PHP processes. When your website tries to use more than that limit, you get the “allowed memory size exhausted” error.

It can happen when:

  • You install a heavy theme or plugin.

  • You import large content.

  • You have multiple plugins running simultaneously.


Step-by-Step Solution Using cPanel

You can easily increase PHP memory allocation to fix this problem. Here’s how:

  1. Log in to your cPanel account.

  2. Find and click on “MultiPHP INI Editor.”

  3. Choose your domain name (e.g., devrumman.com).

  4. Under Basic Mode, look for the memory_limit setting.

  5. Change the value from 128M to 256M.

  6. Click Save to apply changes.

This adjustment gives WordPress more memory to handle complex scripts, preventing similar errors from occurring again.


Additional Tips

  • Keep your plugins and themes updated.

  • Deactivate unused plugins.

  • If the issue persists, contact your hosting provider for a higher PHP memory allocation or server upgrade.


Conclusion

The “Allowed memory size exhausted” error might look intimidating, but it’s easy to fix using cPanel. By increasing the memory limit to 256M, you ensure smoother site performance and fewer PHP-related issues.

Table of Contents

Recent Blogs

I’ve worked with businesses and agencies across different industries to deliver impactful websites. Here are some of the websites I’ve recently designed and developed. Each project reflects my attention to detail, user-focused design, and technical precision.
Scroll to Top

Hire Rumman, a freelance WordPress and Elementor Pro expert. Get responsive, SEO-friendly, and high-performing websites designed to grow your business