WordPress and “ALERT – script tried to increase memory_limit to 268435456 bytes” issue

untitledSometimes you can find the following line appearing in your webserver error logs:

[Tue Mar 13 10:48:03 2012] [error] [client 23.19.25.190] ALERT - script tried to increase memory_limit to 268435456 bytes which is above the allowed value (attacker '23.xx.25.190', file '/var/www/xxxxx/xxxxxx/xxxxxx/web/wp-admin/admin.php', line 109), referer: http://website.com/wp-admin/edit.php

There is a quick solution and it can be found in a file called:

wp-includes/default-constants.php

[20121223 – UPDATED]: Please, see the Andreas comment below.
It seems to be better to move the “define(‘WP_MAX_MEMORY_LIMIT’, ’64M’);” in wp-config.php rather than default-constants.php. Anyway this stopped after the wordpress update
Thank you Andreas!

you can easily change (around line 96) the var value from 256 megs to the memory size that best suits your server needs.

Do not hesitate to comment for help.

Incoming search terms:

  • late5pf (1)
(Visited 1,900 times, 1 visits today)