There are several ways of increasing WordPress memory limit. You can increase the memory limit by your self or contact your hosting provider to do it for you. Lets Start!

cPanel (Recommended):

This is the best and easiest way. Login to your cPanel, scroll down and click Select PHP Version then select Switch to PHP options. Now scroll down and find memory_limit and change the value to your desired one.

Edit wp-config.php file:

Add following code to the very bottom of wp-config.php file, right before the line that says, “Happy Blogging”:

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

Edit php.ini file:

If you have access to your php.ini file, search for memory_limit and change it to 256M

memory_limit = 256M;

Create php.ini file:

If you dont have access to php.ini file then create a new text file and write this memory_limit = 256M; in it, save it and change the file name and extension to php.ini then upload it to your WordPress root or wp-admin folder. Check whichever works for you.

Edit .htaccess file:

You can also increase the memory limit by adding following code into your .htaccess file

php_value memory_limit 256M

Contact your Hosting provider:

If you don’t feel comfortable trying the above methods, or the any of the above methods did not work for you, then you need to contact your hosting and ask them to increase your memory limit.

 

Muhammad Zohaib

Hello, I am a Web Developer who loves building, editing and extending WordPress themes and plugins ;-)

Leave a Reply

Your email address will not be published.