WP_MEMORY_LIMIT option allows you to specify the maximum amount of memory that can be consumed by PHP. This setting may be necessary in the event you receive a message such as “Allowed memory size of xxxxxx bytes exhausted”.
This setting increases PHP Memory only for WordPress, not other applications. By default, WordPress will attempt to increase memory allocated to PHP to 40MB (code is at the beginning of /wp-includes/default-constants.php
) for single site and 64MB for multisite, so the setting in wp-config.php
should reflect something higher than 40MB or 64MB depending on your setup.
WordPress will automatically check if PHP has been allocated less memory than the entered value before utilizing this function. For example, if PHP has been allocated 64MB, there is no need to set this value to 64M as WordPress will automatically use all 64MB if need be.
Note: Some hosts do not allow for increasing the PHP memory limit automatically. In that event, contact your host to increase the PHP memory limit. Also, many hosts set the PHP limit at 8MB.
Adjusting the WordPress memory limit potentially creates problems as well. You might end up hiding the root of the issue for it to happen later down the line as you add in more plugins or functionalities.
If you are facing Out of Memory issues even with an elevated memory limit, you should properly debug your installation. Chances are you have too many memory intensive functions tied to a specific action and should move these functions to a cronjob.
Increase PHP Memory to 64MB
define( 'WP_MEMORY_LIMIT', '64M' );
Increase PHP Memory to 96MB
define( 'WP_MEMORY_LIMIT', '96M' );
Administration tasks require may require memory than usual operation. When in the administration area, the memory can be increased or decreased from the WP_MEMORY_LIMIT by defining WP_MAX_MEMORY_LIMIT.
define( 'WP_MAX_MEMORY_LIMIT', '128M' );
Note: this has to be put before wp-settings.php inclusion.
-
vivo T3 Pro 5G (Emerald Green, 128 GB) (8 GB RAM)Original price was: ₹29,999.00.₹24,999.00Current price is: ₹24,999.00.
-
boAt Airdopes 141 Bluetooth TWS in Ear Earbuds with 42H Playtime,Low Latency Mode for Gaming, ENx Tech, IWP, IPX4 Water Resistance, Smooth Touch Controls(Olive Green)Original price was: ₹4,490.00.₹1,299.00Current price is: ₹1,299.00.
-
Apple iPhone 16 (256 GB) – BlackOriginal price was: ₹89,900.00.₹89,000.00Current price is: ₹89,000.00.
-
Redmi 13C 5G (Startrail Silver, 4GB RAM, 128GB Storage) | MediaTek Dimensity 6100+ 5G | 90Hz DisplayOriginal price was: ₹13,999.00.₹10,499.00Current price is: ₹10,499.00.
-
Apple 20W USB-C Power Adapter (for iPhone, iPad & AirPods)Original price was: ₹1,900.00.₹1,549.00Current price is: ₹1,549.00.
-
Redmi 13C (Starfrost White, 4GB RAM, 128GB Storage) | Powered by 4G MediaTek Helio G85 | 90Hz Display | 50MP AI Triple CameraOriginal price was: ₹11,999.00.₹7,698.00Current price is: ₹7,698.00.
-
One Article PostOriginal price was: ₹2,000.00.₹1,000.00Current price is: ₹1,000.00.
-
Standard PlanOriginal price was: ₹40,000.00.₹29,988.30Current price is: ₹29,988.30.
-
Search Engine Optimization(SEO)Original price was: ₹7,000.00.₹4,999.00Current price is: ₹4,999.00.
Discover more from Soa Technology | Aditya Website Development Designing Company
Subscribe to get the latest posts sent to your email.