- This topic has 0 replies, 1 voice, and was last updated 10 years, 9 months ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › General Stuff › Instructions/F.A.Q › How to Increase WordPress Memory and PHP Memory Limit
Tagged: memory limit, PHP Memory
If you see an error like the following in your browser when doing something on your site, this means that PHP has hit the maximum memory limit allocated for your server/site.
"Fatal Error: Allowed memory size of *** bytes exhausted ..."
You need to increase the memory limit so PHP has more memory available to it. I will explain few different methods that you can try yourself to increase the limit:
Option 1) Changing the PHP memory limit of a site is not a trivial task. You should always try to get your hosting provider to change the memory limit for you. That way you won’t mess something up when you try to do it yourself.
Option 2) If you have access to your php.ini file then look for an entry like the following:
memory_limit = 32M ; Maximum amount of memory a script may consume
Change that number to a bigger value. Save the php.ini file.
Option 3) You can also try to set it via the .htaccess file. Add the following line to your .htaccess file (this will try to set the limit to 128MB):
php_value memory_limit 128M
If you try to upload a file to your server via the media uploader of WorPress and it gives a memory error, then you need to increase your WordPress memory limit.
Edit your wp-config.php file and add a line like the following:
define('WP_MEMORY_LIMIT', '64M');