Changing PHP Memory Limit via wp-config file

WordPress does allow a way to increase or adjust PHP Memory Limit via wp-config file. This only works if the host allows to increase the memory limit. In case if host supports it, memory limit can be increased by just adding the block of code on wp-config file.  Code below sets the PHP limit to […]

Table of Content

Wordpress does allow a way to increase or adjust PHP Memory Limit via wp-config file. This only works if the host allows to increase the memory limit.

In case if host supports it, memory limit can be increased by just adding the block of code on wp-config file.  Code below sets the PHP limit to 128 MB.

[code language="php"]
define( 'WP_MEMORY_LIMIT', '64M' );
[/code]

Similarly memory limit can be adjusted for admin area by using code below:

[code language="php"]
define( 'WP_MAX_MEMORY_LIMIT', '256M' );
[/code]

This is not only the stuff or modifications that can be done via wp-config file alternations. Details about editing wp-config files can be found here.

About Author

Robin Thebe

Digital Strategist based in Sydney.

I am multi disciplined web developer based in Sydney focusing around WordPress web design, wordpress development, SEO Services, SEM and Email Marketing.