Increasing the PHP Memory Limit for WordPress
Sometimes a WordPress Memory Exhausted error shows up when activating a new plugin or doing some other task. The reason why this error shows up is because you exceed your default Memory Limit. There are numerous solutions for it, but in this article we will share the simplest one out of all.
First open your wp-config.php which is located in the root WordPress directory. Then add the following line inside the main php tag:
We just increased the memory limit to 64M. If you still get the error after this fix, then please contact your host. Most likely, they would have to go in their php.ini file to increase the memory limit for you.
Create a php.ini file to increase the memory limit by following these steps:
- Create a blank text file called php.ini
- Paste this code in there: memory=64MB
- Save the file
- Upload it into your /wp-admin/ folder using FTP