When Your WordPress Site Runs Out of Memory
If your WordPress website needs more memory than what’s currently allocated, you may encounter an error message like this:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home/xxx/public_html/wp-includes/plugin.php on line xxx
How to Fix This Issue
There are several ways to resolve this problem. Below are the most common methods:
- Increase Memory Limit via Hosting Panel
- Log in to your hosting account (DirectAdmin or cPanel).
- Navigate to Select PHP Version → Options.
- Find Memory Limit and increase the value (e.g., from 512MB to 2GB).
- Click Apply to save the changes.
- Update Memory Limit in WordPress Configuration
If the error persists, the issue might be caused by the memory limit defined in your WordPress files.
- Go to File Manager.
- Open the file:
- /home/xxx/public_html/wp-config.php
- Locate and edit the memory_limit setting in this file, increasing it as needed.
- Check Additional Files That Can Affect Memory Limit
Other configuration files may override the memory settings. Check and adjust these if necessary:
/home/xxx/.htaccess
/home/xxx/public_html/.htaccess
/home/xxx/user.ini
/home/xxx/public_html/user.ini
If these steps don’t resolve the issue, the problem could be caused by a theme or plugin that is enforcing its own memory limit in another file.
For further assistance, please contact our Support Team.