• Hi,

    I run 3 WordPress websites on single VPS server and all websites`s database are seperated. (Ubuntu 20.04 + Mariadb + Php7.4 + Nginx)

    However, my server memory is not that big, so I applied the below settings:

    php.ini
    memory_limit = 256M

    First website
    define( ‘WP_MEMORY_LIMIT’, ‘128M’ );

    Second website
    define( ‘WP_MEMORY_LIMIT’, ’64M’ );

    Third website
    define( ‘WP_MEMORY_LIMIT’, ’64M’ );

    In this case, will the 2nd and 3rd websites only allow up to 64M of memory?

    Or is it allowed up to 256M according to php’s memory_limit ?

    Thank you.

    • This topic was modified 2 years, 6 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi, the server limit memory_limit will be 256M, however the website memory_limit will be the one you specify in the wp-config.php file.

    2, and 3 will be 64M

    Dion

    (@diondesigns)

    WP_MEMORY_LIMIT mostly applies to frontend pages. If you want to enforce memory limits on the backend, you’ll also need to set the WP_MAX_MEMORY_LIMIT constant.

    Note that many backend processes (updates, media uploads, dashboard, etc) may not run correctly with less than 256MB of available memory.

    If your VPS has less than 1.5GB memory, you should be using MariaDB 10.2 or earlier because later versions require significantly more memory. You should also be running PHP-FPM with pm=ondemand, and the Zend OPcache PHP extension should be loaded and configured for low-memory servers.

    Thread Starter seotaro

    (@seotaro)

    Hello. @diondesigns . Thanks for the advice.

    All right. I’m using a vps of 2gb ram, but I’m always running out of memory, so I’m trying to configure a minimalist server.

    Except for downgrading MariaDB, everything you mentioned has been applied.

    Currently, I am running websites in Ubuntu 20.04 + MariaDB10.6.9 + Php7.4 + Nginx1.23 environment.

    Could you tell me if have any recommanded configuration to apply or change in addition to the settings you answered?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘About memory wp_memory_limit configuration.’ is closed to new replies.