Hey Everyone! Previously I talked about how you can increase maximum file upload size limit in WordPress. In this article, I’m going to tell you how to increase the PHP memory limit in WordPress. This is also a very common WordPress issue. Today, I’ll explain why this error occurs and a number of different ways to solve this issue.
PHP Memory Limit is a server side which error occurs when the server tries to complete an action that requires more allocated memory than the amount of memory currently in place.
How to Increase the PHP Memory Limit in WordPress
Let’s have a look at a number of ways to increase the PHP memory limit in WordPress:
1. Edit php.ini File
In order to increase the PHP memory limit in WordPress through php.ini file, you need to add the following line of code in your php.ini file:
memory_limit = 1024M
If you’re on a shared hosting plan and don’t have access to php.ini file, you can create a new php.ini file, add this code and upload it to the root directory.
2. Modify .htaccess File
You can also solve this issue through .htaccess file. To do so, add the following line of code to your .htaccess file:
php_value memory_limit 1024M
3. Update wp-config.php File
You can also edit the wp-config.php file to increase the PHP memory limit in WordPress. In order to do that, add the following line of code to wp-config.php file:
Please note that these methods are 100% working. If your issue persists even after implementing the above methods, there must be some limitations from your hosting company. In that case, it’s better to contact your hosting company and they can assist in a better way.
I hope after reading this article, you’ll be able to learn how to increase the PHP memory limit in WordPress. If you’ve any questions, feel free to ask in the comment box and I’d be more than happy to assist. If you liked this article, please subscribe to our YouTube Channel. You can also follow us on Facebook, Twitter and Pinterest.