Ways To Increase PHP Memory Limit For WordPress

0 Flares 0 Flares ×

If you are a blogger or webmaster and use WordPress then you must have faced Fatal Error due to memory issues in other words less memory problem. This memory problem in WordPress arises due to some plugins or sometimes due to the use of excessive number of plugins. 

Wordpress Fatal Error

Such types of memory issue in WordPress arises due to the limitation of PHP memory of your server hosting. Generally the hosting server PHP memory is set to a limit which is some time not sufficient to complete some type of process and thus leaves behind a Fatal Error. This article will explain you the way to increase PHP memory for WordPress site. So lets walk through the ways to increase the PHP memory.


How to fix WordPress memory issues

1.  Increasing the memory limit via PHP .ini file

If you have access to PHP .ini file you can increase the memory limit directly. Open the php.ini file and find memory_limit and set the value to 64M or 128M if it is less.

memory_limit = 64M

2. Increase PHP memory limit via .htaccess file

In case you do not have access to php.ini file then you can also increase the PHP memory limit via .htaccess file. Open your .htaccess and add the below line to it to increase the memory to 64M or 128M.

php_value memory_limit 64M

3. Increase the PHP memory limit via wp-config.php file

You can also increase the PHP memory limit via wp-config.php file of your WordPress installation. Open wp-config.php file and search for “WP_MEMORY_LIMIT” if it is there then change the limit size to 64M or 128M, if it is not present then add the below code

define(‘WP_MEMORY_LIMIT’, ’64M’);


Note: Just follow any one of the step above to increase the PHP memory. Successful implementation of any one of these above process will solve your PHP memory issue, if still you are facing the issue you need to contact your hosting provider and tell them regarding the issue.


+Ayodhyanath Guru holds a B.Tech degree in Electrical Engineering and has worked with various prestigious clients in the IT industry and presently working as a Software Engineer. He is a part time blogger and presently authors the Jafaloo.Com blog. Being a tech enthusiast Guru likes to surf the web and blogs about interesting technical topics like How-To guides, freewares, Tutorials, Software, Gadgets, web applications etc. Apart from blogging he likes coding in Java/J2EE and PHP.

You may also like...

1 Response

  1. I thought I needed to use more than one method i.e edit the .htaccess file and alos the wp-config file. Now I know better. Thank you.

0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 0 Flares ×