If your PHP configuration is limited to less than 128mb of memory, you may get a PHP fatal "out of memory" error when WordPress attempts to resize an image, etc. 32mb and 64mb memory limits were common a few years back, and some hosting providers have not revised their PHP configurations since then — which can cause problems with the latest versions of WordPress and some common plugins.
Increasing the WordPress Memory Limit
- Edit your wp-config.php file and enter something like:
See Increasing memory allocated to PHP in the WordPress codex for more info.
- If you have access to your PHP.ini file, change the line in PHP.ini:
memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)
- If you don’t have access to PHP.ini try adding this to an .htaccess file:
php_value memory_limit 128M