Press "Enter" to skip to content

How to Increase WordPress Memory

If you are seeing an allowed memory size exhausted error in WordPress or your are witnessing the infamous WordPress White Screen of Death, then its time to increase WordPress Memory. In this article we are going to show you how to increase your WordPress memory.

What is WordPress Memory?

Whenever we are talking in context of WordPress memory we simply means the memory allocated by the server to the PHP. As we all know WordPress is written in PHP, which is a server side programming language. Every WordPress website needs a server to function properly. A server is nothing but a computer and as is the case with all computers it needs memory to function properly. The server allocates memory to different software modules including PHP.

When your WordPress installation requires more memory than the default allocated memory to PHP then you see this error

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home4/xxx/public_html/wp-includes/plugin.php on line xxx

The default memory allocated to WordPress is 32 MB. By default WordPress tries to allocate more memory if the default allocated memory is less than 64 MB. But 64 MB can be quite easily exhausted.

How to Increase WordPress memory?

There are two ways by which you can increase WordPress Memory or increase PHP memory limit. Both the ways are listed below:

  • By Editing wp-config.php file: You can increase WordPress memory by editing wp-config.php file on your WordPress website. It is located in your site root directory. You have to use a FTP client or file manager in your web-hosting control panel.

The next step is to copy and paste the following code just before the line that says “That’s all, stop editing! Happy blogging.”

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

This code tells WordPress to increase WordPress Memory or PHP memory limit to 256 MB.  Once you are done, save the file and reload your website and that’s it your WordPress memory has been increased.

  • Ask your Web Hosting provider to increase WordPress Memory: If the above solution does not work and you still seeing the error message then there is a chance that your web hosting provider does not allow WordPress to increase your PHP memory limit manually. In this case contact your web host provider and ask them to increase the php memory limit for you.

For more details you can follow the steps shown in the video below

That’s all folks. Stay tune for the next tutorial. If you haven’t subscribed to our weekly newsletter and please subscribe now by clicking the link below

subscribe Button

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    If you like our content then please subscribe