You have just installed Wordpress on your Self-Hosted Domain and added 4-5 Plugin and Themes and tried to add next Plugin and got an Error that look like this one: Fatal error: Allowed memory size of ***** bytes exhausted (tried to allocate some bytes ) in Xyz/ABC Directory, What to do?
This Error mainly caused due to limited PHP Memory allocated for Scripts on your Shared Hosting , which can be increased by editing PHP.ini file, but it will increase PHP Memory for all Scripts present on your Host .
There is also another way to solve this error and considered safe and Easier way by Editing the wp-config.php File,
Note : This Setting will not work if your Host restrict or does not allow for increasing the PHP Memory Limit
This Error mainly caused due to limited PHP Memory allocated for Scripts on your Shared Hosting , which can be increased by editing PHP.ini file, but it will increase PHP Memory for all Scripts present on your Host .
There is also another way to solve this error and considered safe and Easier way by Editing the wp-config.php File,
- Login to your Web Host's File Manager , if you are able to edit wp-config.php directly then well and good, otherwise Download it and Proceed to next Step
- Open the Wp-config.php and this Code before this " /* That's all, stop editing! Happy blogging. */ "
define('WP_MEMORY_LIMIT', '64M');
Note : If your Server already set this limit to 64 MB you can try increasing it to 96 MBdefine('WP_MEMORY_LIMIT', '96M');
- Save the File and Upload it back to your Web-Host replacing the old wp-config.php
- Logout Safely , that's it
- If you still getting the error Feel Free to Contact Me for more Advance Methods
Note : This Setting will not work if your Host restrict or does not allow for increasing the PHP Memory Limit