Back to the blog
phphostingtroubleshooting

Raising the PHP memory limit: when and how?

"Memory exhausted" is a common error, and raising the limit is the usual reflex. It is not always the right answer.

What it means

A script tried to use more memory than allowed and was stopped. The page halts, often half loaded.

When raising it is justified

If your site genuinely does heavy work: image processing, large imports, big exports. There a higher limit simply matches reality.

When it is not

If the error appears on an ordinary page. Then it is a symptom of a plugin loading everything at once or a loop that does not stop. Raising the limit postpones the failure without removing it.

How to investigate

Look at which page triggers the error and what changed recently. Temporarily disable plugins to isolate the cause.

The server ceiling

You cannot exceed what your hosting allows. If you hit that ceiling regularly, the real question is the hosting plan, not the setting.

#php memory limit#memory limit#php memory error
Trust Guard Security Scanned
Call us
Send an email