Fatal Error: Allowed Memory Size Exhausted

edited August 2015 in Other

If on some hosts you’ll notice a ‘Fatal Error : Memory Size Exhausted’ when you install a lot of plugins, upgrade to the latest WordPress version or even you’ll find an error in your Dashboard widget which prevents them from loading fully. In such a case you would need to follow these 5 tips to increase your host’s PHP Memory Limit, these were provided by Dailybloging.org

Tip 1: Increase the limit via PHP.ini file – You can directly increase the PHP Memory Limit if you’ve access to the PHP.ini file. Most small Shared hosting servers won’t give you access to the PHP.ini file. But some servers allow you to create a duplicate PHP.ini in your respective site Directories whose 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 where your WordPress site is installed. In that just add the command memory_limit = 128M in it to increase the Memory Limit to 128 MB.

Tip 2: Changing the Memory Limit via wp-config.php – If you don’t want to mess with the PHP.ini file, then you can go for this method. In this you won’t be needing to create any extra file in your Directory. Just Adding define(‘WP_MEMORY_LIMIT’, ‘128M’); in your ‘wp-config.php’ file would increase your PHP Memory Limit to 128 MB.

Tip 3: Modifying the .htaccess file to Increase Memory Limit – A Default WordPress Installation won’t have a .htaccess file. But in case you already have it for some purposes like ‘301 Redirection’, just add the command php_value memory_limit 128M in your ‘.htaccess’ file and your memory limit will increase to 128 MB.

Tip 4: Changing the Memory Limit via wp-config.php – This method is just an Alternate to the php.ini method. Because the function of the code we use in this method is same as what we put in the php.ini file.You just need to place the code ini_set(‘memory_limit’,’128M’); in the ‘wp-config.php’ file which is placed in the root folder of your WordPress installation.

Tip 5: Have a talk with your Host – If you are a person who is new to all these techie sounding things then it’s better to have a Live Chat / a Call with your Host right away. It’s your right to talk to them & get the necessary changes you need as you’ve paid for it.

Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.