raising memory limit on site

What is a good memory size limit for wordpress you can recommend? 512 MB? Is there any downside to setting it at over 1 GB?

  • Jayman Pandya
    • Recruit

    Hi cornelius_butler,

    The amount of memory limit that you can assign depends on the kind of hosting that you are using. Shared hosting services have relatively low memory limits and the memory limits of Virtual Private Servers (VPS) hosting depends on the configuration of your hosting plan.

    In my understanding, you can safely set the memory limit to 512M on any hosting plan.

    It is also important to change the max_execution_time on the server to get the most out of the increased memory limit. You can add the below snippet in the wp-config.php just above "/* That's all, stop editing! Happy blogging. */"

    // Performance Enhancements
    // Increase WP Memory Limit
    define('WP_MAX_MEMORY_LIMIT', '512M');
    // Increase WP Memory Limit
    define('WP_MEMORY_LIMIT', '512M');

    This will set the memory Limit to 512MB and max_execution_time to 600 seconds.

    If you are using a shared hosting or your VPS hosting plan does not have enough memory, then setting the memory limit to 1G can cause server issues.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.