How to increase WP_MEMORY_LIMIT in 4 easy steps

How to increase WP_MEMORY_LIMIT in 4 easy steps

This article is going to to be a DIY (Do it yourself) tutorial. As you have reached this page, I am going to think that you want to know how to increase WordPress Memory Limit. Though there are several solutions on how to do it correctly, I am going to show you the easiest and best method to do this.

Step #1

Login to your cPanel and go to File Manager. There open the folder that matches with your domain name.

Step #2

On the root directory of your domain, you will find a file named wp-config.php

Step #3

Download that file and copy it in two different folders (for safety purposes). Open any one of this with a text or code editor. I will prefer Notepad++ for this.

Step #4

Just after the opening <?php line add this line. (see attachment below) and then delete the previous file and upload the edited one.

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

Here, I have increased the limit to 256M. You should set this value as per your need.

How to define WP_MEMORY_LIMIT

You are done! ✌

To know more about WP_MEMORY_LIMIT  read What is WP_MEMORY_LIMIT and Importance of WP_MEMORY_LIMIT.

If you have further questions in mind, please comment below. And never forget if it helps, it deserves a share. 😉


Salah Uddin

I’m a Professional WordPress and Speed Optimization Expert. I don't love to wait while browsing any website or application. Since I started building sites using WordPress, I found that I can easily add functionalities to my site just by installing plugins. And the funny point was that most of them are FREE! But, I realized, my website was getting slower because of using too many plugins. While I was searching on Google for “How to speed up a WordPress website” or “WordPress speed optimization tips,“ there were many blogs and forums in the results. Then I started following them and hopefully it worked for me. But, I was still unsatisfied because there were websites available who were performing far better than mine and I was jealous. The journey through Website Speed Optimization began there and still, I am learning new things daily. Here in this blog, I will share my experiences and learning outcomes. I hope it will be a booth of helpful resources for those like-minded people who are also looking forward to knowing the secrets behind an amazingly fast and secure website.

Leave a Reply

Close Menu