Request a free trial

5 Ways to Increase the PHP Memory Limit in WordPress

In a number of cases such as 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, your WordPress site may display the ‘Fatal Error :Memory Size Exhausted’ message. Below is slightly edited article from dailyblogging.org that provides five ways to handle this issue.

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 = 64M in it to increase the Memory Limit to 64 MB.

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', '64M'); in your ‘wp-config.php’ file would increase your PHP Memory Limit to 64 MB.

3. Modifying the .htaccess file to Increase the 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’ which is an important aspect of WordPress SEO.

In such a case just add the command php_value memory_limit 64M in your ‘.htaccess’ file and your memory limit will increase to 64 MB.

4. Changing the Memory Limit via install.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','32M'); in the ‘install.php’ file which is placed in the wp-admin folder of your WordPress installation.

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.

I would recommend you use some quality WordPress hosts available – viz HostGator / DreamHost /BlueHost.

Note:-

Follow any one of the above 5 Methods. Don’t try to implement all the 5 methods at the same moment, else you’ll end messing up things. If you are seriously not a coder then do consult your Host as mentioned in the 5th Point. Don’t experiment with a live blog which is getting considerable traffic.

Have you faced such Fatal Errors in your Initial Blogging Career ??

Share This
Tags
Popular posts
The Role of User Experience (UX) in Website Design
  • Website Design

The Role of User Experience (UX) in Website Design

Read This

Get the most value from your business decisions.

Read This
  • Google Workspace

Can Google Workspace Admin Read My Emails?

Read This
Search
Follow us for more
Related Posts