How to Increase WordPress Memory When It’s Exhausted

I wouldn’t write it better. Sometimes you may find it difficult to run a certain WordPress theme or plugin – you’re getting a message similar to this:

Fatal error: Allowed memory size of 12345678 bytes exhausted (tried to allocate 2345678 bytes) in /home/your-username/public_html/wp-includes/plugin.php on line 1000

I find this quite frustrating. I searched the internet for solutions to this. Here’s a great article I found. I tried to modify the wp-config.php file – no success, I tried to put the php.ini and php5.ini file into wp-admin folder – it didn’t work…

Finally, I updated my .htaccess file with the values from the article – and it worked like a charm!

Here’s the code I put into the .htaccess file that prevented the “exhausted message…”:

php_value upload_max_filesize 1000M
php_value post_max_size 2000M
php_value memory_limit 3000M
php_value max_execution_time 180
php_value max_input_time 180

I simply overwrote the existing file with the updated file. There was no need to contact my web hosting company or logging into my cPanel… I love when such issues are solved by a few tweaks by myself.

Click Here to Leave a Comment Below 0 comments

Leave a Reply: