
Two errors often appear together. Allowed memory size of X bytes exhausted means the page needed more memory than it was given. Maximum execution time exceeded means the page needed more time. Both are symptoms of the same thing, something doing too much work during a single page load.
| Where the error shows | What it tells you |
|---|---|
| When uploading an image | The image is too large to process at the current memory limit |
| During an update | Extracting the package does not fit the limit |
| In an import or export | The job is too big for one run and needs splitting |
| On an ordinary page | A plugin or theme does too much on every load |
The memory limit can be raised by adding define('WP_MEMORY_LIMIT', '256M'); to wp-config.php. This is the right move when you need the site open right now so you can get in and fix the actual cause. It is not a solution, because the limit returns as the site grows.
Switch the plugins off and enable them one at a time, as described in our guide on a plugin that broke the site. Memory is typically consumed by page builders, multipurpose themes, statistics plugins that write every visit to the database, and backup plugins that compress the whole site mid visit.
An image straight from a camera can be tens of megabytes, and WordPress then creates several sizes of it. Scale images to a sensible web size before uploading. This removes one of the most common causes entirely.
Imports, exports and bulk edits are better run in batches. Many tools offer batching out of the box, and it is almost always better than growing limits until one run fits.
Running out of memory and running out of time are the far end of the same phenomenon. If the site does not crash but is slow, start from our guide on why a WordPress site is slow. If a server error appears instead, see 502, 503 and 504.
Do not raise the limit again and again without anyone looking at where the memory goes. That pushes the problem forward and makes it more expensive, because eventually you meet the real ceiling of the server rather than a setting.
We find what consumes the memory or the time and fix that, rather than simply raising the limit. We also tell you whether this is one plugin or a site that has outgrown its plan.