In order to increase WordPress memory limit follow these steps:
1. Go to cPanel > Files section > File manager menu:
2. Navigate to the root folder of your domain [by default, it is public_html for the main domain and addondomain.tld for the addon domains]. Select wp-config.php file and click Edit:
Add the following code right before the /* That's all, stop editing! Happy blogging. */' line:
define[ 'WP_MEMORY_LIMIT', '512M' ];
where 512 is the memory limit you want to set:
NOTE: it is also possible to change WP_MEMORY_LIMIT by going to wp-includes folder of
the installation and editing default-constants.php file.
That's it!
Need any help? Contact our HelpDesk
- Created September 18, 2017
- Category WordPress Troubleshooting
If you are experiencing Memory Exhausted errors on your WordPress installation, it’s usually due to a plugin, theme or other script exceeding the default allocated memory size limit.
The solution is to increase your PHP Memory limit. HostPapa VPS users can adjust the memory limit by making a change to the WordPress wp-config.php file.
Log in to your HostPapa Dashboard and in the top navigation menu, select My cPanel.
Now select File Manager.
Locate the wp-config.php file in your WordPress folder. Right click the file and select Edit.
Now add the following code, just before the line that says ‘That’s all, stop editing! Happy blogging.’
define[ 'WP_MEMORY_LIMIT', '256M' ];
Save the file, and head back to WordPress – the memory error should now be resolved.
If your WordPress installation is running on a HostPapa shared/reseller service, you will need to resolve the issue a different way.
In your cPanel, click Software > Select PHP Version.
Now click Switch to PHP options.
Find and click the memory_limit setting, which allows you to edit the option. Use the dropdown menu to select the new limit. Click Apply, then Save.
For more help, or to ask a question, please open a support ticket from your HostPapa Dashboard. Follow this link to learn how.