Introduction
You can adjust the memory allocated to PHP on your own, here are some methods to try. I recommend starting at the top an working your way down the list. Apply only one change at a time, do not try to apply them all.
Be aware that this requires advanced knowledge; it is not basic and you can crash your site. If you are not comfortable applying these changes it is highly suggested you contact your web host tech support for assistance.
The recommended minimum to set the memory limit to is 128MB.
Increasing the Memory Limit via wp-config.php
Add this to the very bottom, right before the line that says, “Happy Blogging”:
define('WP_MEMORY_LIMIT', '128M');
define( 'WP_MAX_MEMORY_LIMIT', '256M' );
You can learn more about this change in the WordPress documentation; Increasing memory allocated to PHP.
Increase the Memory Limit via php.ini
Many shared hosting providers to not provide access to the the php.ini file. However, if your web host does provide access to the file search for the line that beings with memory_limit
and change its value to 128M
. If it does not have this line, add this to the bottom of the file:
memory_limit=128M
You will have to consult your web host tech support documentation or contact them to determine if they provide access to this file.
Increase the Memory Limit via .htaccess file
On hosts where you do not have access to the php.ini you might be able to adjust the memory allocation using the .htaccess file. Add this line to the top of the file:
php_value memory_limit 128M
Important, if your host does not support setting PHP environmental values using the .htaccess file, adding this line could cause the server to return an error instead of loading your site. Removing this line will remove the error.
Contact Your Web Host
If none of these methods work, please contact your web host support to help you increase the PHP memory allocation.