+92 308 5039935
Get a Free Quote
+92 308 5039935

How to Increase the WordPress Memory Limit

How to Increase the WordPress Memory Limit

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”:

Edit php.ini file:

If you have access to your php.ini file, search for memory_limit and change it to 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

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.

Hello, I am a web designer and developer working since 2013. I build WordPress themes, write and extend WordPress plugins, edit WordPress themes and plugins in accordance to customer needs and play games when free ;-)
Related Post
Minify CSS
How to minify CSS in WordPress Theme or Plugin

Minification is used to remove unnecessary elements, e.g: extra spaces. There are a lot of php scripts to minify or compress the css but we are going to use a simple function  here. It is usually used for inline css in WordPress.

Read more
How to add inline CSS in WPBakery Page Builder Element

WPBakery Page Builder (Formerly Visual Composer) is one of the best drag and drop front-end/back-end builder. You can easily apply inline css using style attribute but what if you need to apply css to a pseudo elements?

Read more
How to Auto Load Files in WordPress?

You may need to auto load files in WordPress themes or plugins. But I wouldn’t recommend it if you are creating theme to sell on themeforest. They didn’t accepted themes with this auto load function few years ago when we used

Read more

Leave a Reply

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