About this Article
If you run a web application (for example WordPress) and you’re seeing memory exhausted errors, this article describes how to correct this.
What Does the Error Mean?
This is often down to PHP Memory Limit. If the memory the script is trying to use is greater than the limit set then you will see this error.
How to Correct This Error
You can change this in your web hosting panel. Here’s how:
- Login to cPanel Control Panel
- Scroll to the Software Section
- Select Select PHP Version
- Click the Switch to PHP Options link on the right
- Look for memory_limit in the list. You will find this is probably set to 64M or 128M
- Click on the current value and select a new one. 256M should do it. If you do select any higher, it won’t matter as the server is configured to only allow a max of 256M
- Click Apply. Click Save at the bottom of the screen
- Job done
An Alternative Approach for WordPress
If you are using WordPress, you can also set this by adding the following to your wp-config.php file:
That should fix it. If not, please submit a ticket and we’ll take a closer look for you.