If you see "Allowed memory size exhausted", WordPress needs more PHP memory.
Step 1: Raise PHP's limit
- In cPanel, open MultiPHP INI Editor in the Software section.
- Choose your domain.
- Set memory_limit to 256M (or 512M for heavy sites) and click Apply.
Step 2: Tell WordPress
Edit wp-config.php and add this line above /* That's all, stop editing! */:
define( 'WP_MEMORY_LIMIT', '256M' );
Check it worked
Go to Tools › Site Health › Info › Server and look at the PHP memory limit.
Note: your hosting account also has an overall memory limit (see How to understand resource limits). If a site needs more than that, find out which plugin is using so much memory or consider a larger package.