• Resolved simonhuang

    (@simonhuang)


    hello,i’m confused about the 2 vaule in elementor-system info.first I’ve set php.ini memory limit to 760M:

    PHP Memory Limit:768M
    Memory limit:40M)(it default generate)
    which vaule will elemenotor pick up?768M or 40M?

    • This topic was modified 1 year, 1 month ago by simonhuang.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Milos

    (@miloss84)

    Hi there,

    Thank you for contacting us.

    Elementor will use the lower of the two values, meaning it will be limited to 40M in your case.

    1. PHP Memory Limit (768M) – This is the maximum memory limit set in your php.ini configuration. It defines the upper memory allocation for PHP scripts.
    2. WordPress Memory Limit (40M) – This is the memory limit set by WordPress. By default, WordPress defines it as 40M for frontend and 64M for the admin panel, unless overridden in wp-config.php.

    To allow Elementor to use more memory, you need to increase the WordPress memory limit by adding this line to your wp-config.php file:

    define('WP_MEMORY_LIMIT', '512M');

    // Or any value up to your PHP limit (768M)

    define('WP_MAX_MEMORY_LIMIT', '768M'); // For admin and intensive tasks

    After making this change, check the Elementor System Info again, and you should see the memory limit reflect your updated value.

    Hope this helps

    Thread Starter simonhuang

    (@simonhuang)

    @miloss84 Thank you for your great reply,i got 3 question about this,can you help me?
    1.the php memory means the global upper limit?
    2.i get a 16G VSP,as elementor recommend 768M.
    if i set php memory limit set to 768M,add this 2 line to wp config.php,did this optimize right?thanks!

    //WordPress memory limit
    define('WP_MEMORY_LIMIT', '512M');//frontend
    define('WP_MAX_MEMORY_LIMIT', '768M');//backend端

    3.i got 4 websites on my vps,i can set 512M memory limit for each site wp config?That is to say, the four websites will share a limit of 512 megabytes (MB), instead of consuming a total of 512*4= 2048MB of memory.?

    thankyou so much!

    • This reply was modified 1 year, 1 month ago by simonhuang.
    • This reply was modified 1 year, 1 month ago by simonhuang.
    • This reply was modified 1 year, 1 month ago by simonhuang.
    • This reply was modified 1 year, 1 month ago by simonhuang.
    • This reply was modified 1 year, 1 month ago by simonhuang.
    Plugin Support Milos

    (@miloss84)

    Hi there,

    I will gladly help you with your additional question:

    1. Does the PHP memory limit mean the global upper limit?
      • No, the PHP memory limit (memory_limit in php.ini) is per script execution, not a global upper limit for the entire server. Each PHP request can use up to the defined limit. If multiple scripts run simultaneously, they collectively consume more memory.
    2. Is setting WP_MEMORY_LIMIT to 512M and WP_MAX_MEMORY_LIMIT to 768M in wp-config.php an optimal approach?
      • Yes, this setup is generally correct.
        • WP_MEMORY_LIMIT (512M) sets the memory available for frontend requests (e.g., visitors browsing the site).
        • WP_MAX_MEMORY_LIMIT (768M) sets the memory for backend/admin tasks (e.g., Elementor editing, WooCommerce admin operations).
      • However, you also need to ensure your server’s php.ini file (memory_limit) is set to at least 768M for these settings to be effective.
    3. Can you set 512M for each of the 4 websites, and will they share a total of 512MB or 2048MB?
      • Each website can have a 512M limit, but they do not share a single 512MB pool. Instead, each site can use up to 512M per PHP request.
      • If all four sites have simultaneous high-memory usage, they can collectively use up to 4 × 512M = 2048M (2GB), depending on traffic and requests.
      • Since your VPS has 16GB RAM, this setup should be fine unless your sites are very resource-intensive.

    Hope this helps

    Kind regards,

    Thread Starter simonhuang

    (@simonhuang)

    @miloss84 understand now!thankyou so much for your patience

    • This reply was modified 1 year, 1 month ago by simonhuang.
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘what’s the different between PHP Memory Limit and WP Memory limit?’ is closed to new replies.