When your WordPress site requires more memory than the default allocation, you may encounter the following error message:
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
Here are several methods to resolve this issue:
-
Increase Memory Limit via Hosting Account:
- Log into your hosting account (using either Direct Admin or cPanel).
- Navigate to Select PHP Version and click on Options.
- Increase your Memory Limit. For example, if it's set to 512 MB, consider increasing it to 2 GB.
- Click Apply to save the changes.
-
Adjust Memory Limit in wp-config.php:
- Open File Manager and locate the file at:
/home/xxx/public_html/wp-config.php
- Edit the
memory_limit
setting within this file and increase it accordingly.
- Open File Manager and locate the file at:
-
Check Additional Configuration Files:
- Review these files for any memory limit settings that may affect your site:
/home/xxx/.htaccess
/home/xxx/public_html/.htaccess
/home/xxx/user.ini
/home/xxx/public_html/user.ini
- Review these files for any memory limit settings that may affect your site:
If these steps do not resolve the issue, it may be related to a WordPress theme or plugin enforcing a memory limit in a different stored file.