What I check first when a WordPress site throws a memory exhausted error

Leader ●1 ●20 ●110
calendar_today • schedule1 min read
— Originally published at amanurrahman.com

A client message I see often: "the site went white after I installed a plugin," and the log shows an allowed memory size error. Here is the order I work in, because the usual advice skips a step.

First, I do not touch any file. I read the error. The number is in bytes, so 134217728 means the site was capped at 128 MB. The file path at the end tells me which plugin or theme was running when memory ran out.

Second, I check what limit PHP really has. In wp-admin, Tools then Site Health then Info then Server shows it. If it says 128M, adding a 256M line to wp-config.php will not help, because the host's ceiling wins. That is the number one reason the popular fix fails.

Third, I raise the limit at the layer that owns it: the hosting panel's PHP settings, a php.ini or .user.ini line, and only then wp-config.php. I avoid the .htaccess php_value method unless I know the server uses mod_php, since on PHP-FPM it turns one error into a 500.

Fourth, and this is the step people skip, I find out why memory ran out. I turn on WP_DEBUG_LOG with display off, repeat the action that fails, and read the newest lines in debug.log. If one plugin keeps appearing, I deactivate it by renaming its folder and retest. Usually the culprit is a backup plugin, a big import, an unresized image upload, or a page builder page with too many widgets.

If a site needs 512M to load a basic page, a bigger limit is a bandage. I would rather fix the source.

Full guide with the bytes table and a symptom-to-cause chart: https://amanurrahman.com/blog-post/wordpress-allowed-memory-size-exhausted-fix

Want more #webdev & #web-development deep dives?

Join 6,053+ developers sharing real benchmarks, code breakdowns, and projects. Free forever.

More Posts

Just completed another large-scale WordPress migration — and the client left this

saqib_devmorph - Apr 7

Short links that outlive the vendor: a newsroom URL shortener on WordPress and AWS

jaafarabazid - Nov 10

How AI Is Changing Web Development, and What Developers Still Need to Understand

Daniel Decker - Nov 10

How I Built a React Portfolio in 7 Days That Landed ₹1.2L in Freelance Work

Dharanidharan - Feb 9

Architecting a Local-First Hybrid RAG for Finance

Pocket Portfolio - Feb 25
chevron_left
4.6k Points • 131 Badges
Bangladesh • amanurrahman.com
74Posts
9Comments
14Connections
WordPress & WooCommerce Developer with 14+ years of experience building, optimizing, and scaling onl... Show more

Related Jobs

View all jobs →

Commenters (This Week)

12 comments
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!