How to increase server memory limit

79 views Apr 26, 2016 faq 0

Edit in php.ini file

If you have access to the PHP.ini file you can directly increase the PHP Memory Limit. If you have access the php.ini file, find memory_limit and increase its limit as memory_limit=256M

Some shared hosting servers would not give you access to the PHP.ini file. But some servers allow you to create a duplicate PHP.ini in your respective site directories which data/values will override the default php.ini values. To do that you just need to create a file with the name ‘php.ini’ in the directory in root directory. In that php.ini file write the following code:

memory_limit = 256M

Increase memory limit in wp-config.php

Open wp-config.php file in root directory. Paste the following line in that file

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


Increase memory limit in .htaccess file

WordPress create a .htaccess file when permalink set.  Paste the following code in .htaccess file at the very bottom

php_value memory_limit 512M

If these solution is not working talk to your host provider to increase this value for you.

Was this helpful?