If you are blogger with wordpress platform, one time sure you meet with wordpress error code below :
Fatal error: Allowed memory size of … bytes exhausted (tried to allocate … bytes) in …./xxx.php(… : runtime-created function on line x
This error may be caused by your wordpress over limit to import a file from your server. May be showed a blank screen or error above. And now how to solve this problem:
At the first, please you following this link WordPress FAQ about Working with WordPress. There 3 ways to solve this memory limit :
- Increase the memory limit setting in php.ini (e.g. memory_limit = 64M ;). Many hosts may not allow this.
- Increase the memory limit via .htaccess (e.g. php_value memory_limit 64M). Many hosts may not allow this.
- Increase the memory limit via wp-config.php (e.g. define('WP_MEMORY_LIMIT', '64MB');)
But, from the 3 ways above, the easy way to do set wordpress memory limit is via wp-config.php. Like me, i just add this script to wp-config.php file the problem is fixed: