0

Let's say a WordPress website has the following settings:

  • PHP Memory Limit: 100MB
  • WordPress Memory Limit: 50MB

What happens when the WordPress Memory Limit is exceeded?

  1. Do plugins/themes stop / Do processes fail?
  2. Does the website hang on the back-end/front-end?
  3. Are public website visitors presented error messages or is it all a background affair?

Why is it a bad idea to set it too high?

2

There isn't really such a thing as separate WP memory limit. It's just a WP way with messing with PHP setting, instead of just using... you know... PHP for that.

  • If WP limit is more than PHP limit then WP will attempt to increase PHP limit (which doesn't mean it will succeed at that, but it will try).

  • If WP limit is less (such as in your example) then it is simply ignored.

The practical need for a limit is too prevent PHP from draining more memory than server can realistically spare. Hosts usually have hard maximum limit, you won't be able to go above via configuration.

So the answer to your question is — exceeding WP memory limit is meaningless, what matters is exceeding real PHP limit. In which case page will crash with fatal error.

Note that memory limit affects each execution/page view, not a site as a whole. So might be crashing as much as completely everything and as little as one individual page. Whatever is leaking or overusing memory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.