Introduction

The WordPress memory limit error usually appears after a plugin update, theme change, backup run, or import job pushes PHP beyond the amount of memory your host allows. In most cases the site is not completely broken, but admin pages, plugin workflows, or specific front-end routes start throwing a fatal error until the limit is raised or the heavier process is isolated.

Symptoms

  • The dashboard fails to load after login
  • Plugin or theme updates stop mid-process
  • Imports, backups, or page builders crash unexpectedly
  • A fatal error mentions Allowed memory size exhausted
  • The problem appears only on certain admin screens or heavy pages

Common Causes

  • PHP memory_limit is lower than the workload requires
  • A plugin, theme, or builder consumes too much memory during a request
  • Shared hosting applies a hard cap lower than the value in WordPress config
  • Background tasks such as backups, image processing, or imports overlap with normal traffic
  • The site is running old code that leaks memory during repeated operations

Step-by-Step Fix

  1. Confirm the exact error message in the browser, server log, or WordPress debug log so you know this is a memory limit issue rather than a generic fatal error.
  2. Check the current PHP memory_limit in your hosting control panel, PHP info page, or host documentation.
  3. Add or update define( 'WP_MEMORY_LIMIT', '256M' ); in wp-config.php above the line that says /* That's all, stop editing! */.
  4. If wp-admin tasks still fail, also set WP_MAX_MEMORY_LIMIT to a higher safe value such as 256M or 512M for admin-side operations.
  5. Verify that your host actually allows the target value. Some shared plans ignore higher values in WordPress and keep a stricter server-level cap.
  6. Temporarily disable the most recently changed plugin, theme, import tool, or backup job and test again.
  7. Re-run the exact action that failed before, such as updating plugins, loading the editor, or importing content.
  8. If the error returns quickly, inspect the slowest or heaviest plugin first rather than raising memory indefinitely.
  9. Keep the final limit only as high as necessary and document the reason for the change for future maintenance.