How to Increase PHP Memory Limit in WordPress {Tutorial With Screenshots}

Behind increasing, the WordPress PHP Memory limit could be several reasons. Some of them are HTTP error while uploading the image, white screen of death and also 500 Internal server error, Fatal error: Allowed Memory size(Memory exhausted error) and more.

By default, WordPress comes with 32MB memory, which is quite low and needs to be increased for the obvious reasons. And doing so, it will certainly fix memory exhausted error in WordPress just like a magic.

WP Rocket - WordPress Caching Plugin

We got plenty of reasons to increase WordPress PHP memory limit now, isn’t it? Let do it.

As we have several reasons to do so, we have several ways to do so. I will walk you through them in this tutorial.

Increase PHP Memory Limit through WP-Config in WordPress

It would be easier for you if you have ever edited your wp-config file before. If you haven’t this is the step by step guide for you. You need to access the root folders and files of your site. You can do it through the FTP server or even from your Control Panel. Here I will do it through the Control Panel.

Go to your Control Panel. It can be accessed by following similar link as below,

https://www.yourdomainname/cpanel, replace yourdomainname with your actual domain

 

Cpanel

Enter the Login credentials, After landing on the CPanel Dashboard. Look for File Manager and Click on it. You will see your site database and files over there.

File Manager

To Access WP-Config file, look for  public_html  and click on that. You will find  WP-Config  file over there, right-click on it and Edit it.

wp-config

This will open a code editor, and find the line which will look alike, “That’s all, stop editing! Happy blogging“.

Edit WP-config

And paste the below code, just above it. Make sure you do it exactly the same!

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

All you need to do now is to hit the Save Changes button. The above code defines WordPress to increase the memory limit to 256M, though you can increase or decrease that number. It all depends on how big your site is. But, if you don’t know what you are doing, leave it to 256M.

That’s’ it, doing this you will be get rid of the memory exhausted error. Please share your thoughts if this helps in the comment section below.

How to Increase PHP Memory Limit in WordPress {Tutorial With Screenshots}
Liked it? Rate this post

2 thoughts on “How to Increase PHP Memory Limit in WordPress {Tutorial With Screenshots}”

  1. All Post information about your blog is very unique and good for reader because when i have read your blog looks very impressive for me. I want to say thanks to you. Most importantly I have bookmark your site for future updates.

Leave a Comment

Questioncage

Subscribe To QuestionCage

Glad to see your Visit at QuestionCage!

One more step to connect ahead "Subscribe to Us" and get the updates to your inbox directly.

You have Successfully Subscribed to QuestionCage!

Share
Share
Tweet