Guides › WordPress › Site down or error screens

WordPress "Allowed Memory Size Exhausted" Error: Fix It

PHP ran out of memory. Raise the limit in wp-config.php or your hosting panel, then find what is using it.

Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
Site down or error page

The full message reads like Fatal error: Allowed memory size of 134217728 bytes exhausted. That number is the limit in bytes, and 134217728 is 128 MB.

1Raise the WordPress limit2Raise the limit in your hosting panel3Find what is using the memory4Reduce the loadFixed? Test the site. If not, get help.
The steps in order. Work down the list and stop when the problem is solved.

Step 1: Raise the WordPress limit

Illustration for Step 1: Raise the WordPress limit

Add this line to wp-config.php, above the line That's all, stop editing!:

define( 'WP_MEMORY_LIMIT', '256M' );

Important: this setting only works up to the limit your hosting allows. If your host caps PHP at a lower value, WordPress cannot go beyond that cap.

Step 2: Raise the limit in your hosting panel

Illustration for Step 2: Raise the limit in your hosting panel

Most hosting panels have a PHP configuration page with a memory_limit option. Choose a higher value such as 256M or 512M. Some plans only offer certain values, so check what your plan allows.

Step 3: Find what is using the memory

Illustration for Step 3: Find what is using the memory

Raising the limit treats the symptom. Look at the cause:

If the error began right after installing or updating something, switch that plugin off by renaming its folder in wp-content/plugins.

Step 4: Reduce the load

Illustration for Step 4: Reduce the load

Still failing?

Your host can see the exact PHP limits for your account. Ask them what the maximum memory_limit is on your plan.

Free tool for this problem: Site Health Checker

Related guides

Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.

Last updated 2026-11-21.