Reasonably add the memory limit available for WordPress when, a memory error the requires.
Steps….
- Check the current limit — See Tools > Site health > Information > Server.
- Control the boundaries of the hosting — WordPress value cannot exceed the limits actually allowed by PHP/host.
- Edit wp-config.php if appropriate — Add a WP_MEM constant before the end of edition line.
- Retester site – Check if the error disappears.
- Searching for cause — Excessive consumption may come from a plugin, a theme or an abnormal request.
Commands
define('WP_MEMORY_LIMIT', '256M');
Key takeaways
- Overtime incrementing memory does not fix a faulty leak or plugin.
- Contain a copy of wp-config.php before modification.