How to increase Your WordPress and PHP Memory Limit ?

WordPress is a nice blogging tool or a content publishing platform that comes with an expensive set of features. Using the inbuilt appealing features you’ll be able to create a professional looking site or blog just within few steps.

WordPress could be a script that’s enclosed within the Softaculous or Fantastico software that is obtainable for free of charge with any cPanel web Hosting package. Usually, WordPress includes a default memory limit of 32MB, that isn’t comfortable once you increase the number of plugins or once your web blog traffic will increase tremendously.

WordPress Blog Stops Functioning and Shows Error

Fatal error: Allowed memory size of 33554432 bytes exhausted

In such case, most of the times people either open a ticket at the service and wait for the response from their webhosting provider. Some people attempt to make changes within the .htaccess file and corrupts whole WordPress web blog. Before doing any changes to the WordPress files the user should always take backup of their WordPress data.

The above issue are often solved by navigating to the wp-config.php file typically that is found at the WordPress installed folder. Edit the file using SSH or the File Manager and add the subsequent line to the wp-config.php file.

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

You can set up the above memory limit up to 32MB, 40MB, 64MB or 128MB.

If you’re using a cPanel shared hosting plan, you’ll need to raise question to your web hosting provider to extend the memory limit. If your WordPress is on a self-hosted plan, then you’ll be able to increase the memory as long as you would like, however it should not exceed the RAM allocated to your dedicated server.

It is required to increase the memory limit of PHP as well, since WordPress is a collection of PHP based files. If your WordPress is self-hosted, however have multiple blogs installed, you’ll have to be compelled to assign enough memory so as to handle all the installations.

On the cpanel servers, you’ll notice the PHP file located at the following location:

/etc/php.ini

Simply, search for the below line in the file:

memory_limit =

Allocate the memory limit consistent with your requirements. Since, we’ve allotted 64MB of memory in the above example, in PHP file we are going to allot an equivalent quantity of memory to PHP.

memory_limit = 64M

Accordingly, if you’re having 2 WordPress blogs intense 64MB memory each, you’ll set the PHP memory limit to 128MB as shown below:

memory_limit = 128M

Once you’re done with the above steps, simply refreshing your WordPress web blog can solve the memory limit error.