Elementor "Allowed Memory Size Exhausted": Raising PHP Memory the Right Way
Elementor slows down, times out, or throws "Fatal error: Allowed memory size of X bytes exhausted" when you open or save a large page. Shared hosting with a low PHP memory limit is the usual cause. Elementor recommends at least 128M; 256M–512M is safer for big layouts.
Fix 1: Raise memory in wp-config.php
Open wp-config.php and add these lines above /* That's all, stop editing! Happy publishing. */:
PHP
define('WP_MEMORY_LIMIT', '256M');
define('WP_MAX_MEMORY_LIMIT', '512M');WP_MEMORY_LIMIT— frontend and normal requestsWP_MAX_MEMORY_LIMIT— wp-admin and the Elementor editor (heavier)
Fix 2: Set memory_limit in php.ini
If the host allows it, also set:
INI
memory_limit = 512MMany panels expose this under PHP settings, MultiPHP INI Editor, or “Select PHP Version → Options.” If you cannot change it, ask the host — some managed plans block wp-config.php overrides.
Fix 3: Lighten the page and assets
- Reduce the number of widgets/sections on a single page (split into multiple pages if needed).
- In Elementor → Settings → Features, enable optimized / improved asset loading options when available.
- Avoid nesting many containers inside containers on one canvas.
- Compress large images before upload.
Quick checklist
- Exact error: Allowed memory size of X bytes exhausted
WP_MEMORY_LIMIT256M +WP_MAX_MEMORY_LIMIT512Mmemory_limit = 512Min php.ini if the host allows it- Fewer elements per page; enable Elementor optimized assets
Related: Elementor editor won't load · WordPress white screen of death