• Hi, guys!

    I have set php memory limit to 2048M on my wp-config and everything works great in the front end. I’m using the Query Monitor plugin and it says my site’s front end is running at 2048M.

    In the backend it only runs at 256M. Query Monitor says: 256M Overridden at runtime from 2048M.

    I tried setting the mam memry limit in wp-config.php, htacces and php.ini and wordpress always overrides the 2048M limit in the backend to 256M. Everything works great in the frontend though.

    Any help is greatly appreciated

Viewing 5 replies - 1 through 5 (of 5 total)
  • 2048MB seems very high, why do you need such a high memory limit? 256MB should be more than enough.

    Thread Starter miguelkennedy

    (@miguelkennedy)

    Because I have a lot of plugins installed and a lot of resources in my server. My WP backend runs quite slow…

    Type:
    find -type f -print0 | xargs -0 grep -l “memory_limit”

    To find files that overwrite the memory limit

    It seems that admin.php in wp-admin folder is using wp_max_memory_limit. If you don’t have it set it uses 256. So you can have wp_memory_limit to 2056, php.ini set to 2056 for memory_limit but still get 256 overridden in wp-admin (while the site itself having 2056.

    define(‘WP_MEMORY_LIMIT’, ‘2056M’);
    define(‘WP_MAX_MEMORY_LIMIT’, ‘2056M’);

    So just make sure both are the same or even higher for wp_max_memory and you should be fine. Sorry for late answer but just hit the same issue.

    Thread Starter miguelkennedy

    (@miguelkennedy)

    Thanks, Evotec.

    Worked perfectly! ??

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Note that increasing the memory limit doesn’t actually make things run faster or better. It can actually make things much worse.

    Ideally, you want your memory limit to be as low as possible, without actually being too low for the site to work. WordPress normally uses a 40M memory limit, or 64M on multisites. It bumps this up to 256M only for processing images which is a memory intensive operation.

    Increasing the memory limit to large numbers will not make any difference whatsoever in the speed or responsiveness of the website.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Memory Limit is Overridden in Backend’ is closed to new replies.