This problem comes because some plugins need more memory_limit to run in our website and errors seem like —
Fatal error: the Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home4/xxx/public_html/wp-includes/plugin.php on line xxx
By default memory limit is 32mb. The best way to increase this limit is by using wp-config. This is one of the shortest and best ways to do it.
- Open
wp-config.phpin the editor, which is placed in your root folder. - Find this line:
/* That's all, stop editing! Happy blogging. */ - Paste this line below it:
define('WP_MEMORY_LIMIT', '64M');
This will set the memory limit to 64mb. If you need more than this, you can change it to 128M or 256M depending on your requirement.
Memory limits are just one resource constraint to watch — if the site is also slow under load, comparing caching plugins in WP Rocket vs W3 Total Cache vs LiteSpeed is a natural next step.


