Question

How to Set Memory Limit for WordPress Website

Posted December 9, 2018 3k views
UbuntuCMS

Droplet Config : 4GB RAM
Managed by Serverpilot

Current Memory Limit : 128MB Memory, WP Limit 40MB
Max File Upload: 512MB

The Droplet hosts only one WordPress Website.

I want to set memory Limit as

define( ‘WPMEMORYLIMIT’, '1024M’ );
define( 'WPMAXMEMORY_LIMIT’, '2048M’ );

Will there be any issue?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Hey friend,

I would go for smaller numbers. If you need a single PHP process to load that much memory, I propose that the effort is better spent optimizing the application to use less memory. That said, it never hurts to try anything and see what happens :)

Jarland

Hello there,

You can apply these values to your WordPress application, but usually, a WordPress website won’t need that much memory to handle a PHP process even when the site is busy. I will recommend you to set the limit lower and in case you run into the issue to troubleshoot what went wrong and the issue was related to process timing out or the server running out of memory and etc.

Regards,
Alex