-
The Previous Posting
« I Don’t Have Outlook,... -
The Next Posting
How Do I Specify a Class For... »
WordPress, Fatal error: Allowed memory size of 33554432 bytes exhausted
![]()
During a routine update to a WordPress site we received the following error: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 7680 bytes) in /home/website/public_html/wp-includes/functions.php on line 1342 Scary stuff, but no need to panic. Chances are your WordPress install is quite well used with lots pages, posts, and plugins. First off, don’t start disabling plugins and hacking code. Follow these simple steps and you’ll be updated in no time.
Please be sure to follow this one peace of advice, bypassing this one step could cause you untold hasle. WordPress has matured into an amaing product, a product that no longer requires us to manually transfer files. So any files you maintain locally will be quickly outdated. So please before implementing a fix like the one here, download the latest version of that file from your server. Always cover your bases.
The first thing you should look at is the “wp-settings.php” file, located in your root directory. in the root of your install. In some instances this code likes to hide in “wp-config.php” instead of “wp-settings.php”. Chances are you code looks something like this.
1 2
if ( !defined('WP_MEMORY_LIMIT') )
define('WP_MEMORY_LIMIT', '32M');In this case we would change the memory limit from 32M to 64M. Upload the file to your server, and attempt the update again. Chances are your good to go at this point.
But if you don’t see a memory limit in your “wp-settings.php” or “wp-config.php” files, or in the rare case that you did change it and it still didn’t work, you’ll need to look at your “php.ini” file, also located in the root of your install. In the “php.ini” file you’ll be looking for the following.
1 2 3 4 5 6 7 8
< ?php
ini_set('memory_limit','32M');
/**
* WordPress Installer
* @since unknown
* @var bool
*/
define('WP_INSTALLING', true);Again you’ll be changing the memory limit from 32M to 64M. Upload the file to your server, and reattempt the update.
In the rarest of rare cases, the memory limit has also been known to reside in the .htaccess file. Again, this file is located in the root install directory. Only if you see the following code, should you change it.
1
php_value memory_limit 32M
Again you’ll be changing the memory limit from 32M to 64M. Upload the file to your server, and reattempt the update.
A word of warning. Be sure to backup all your files before making these changes. Altering any of the files mentioned in this post without at least a basic understanding of server functions, and php, can lead to “Really Bad Things”. We are not responsible for any damage or lost info. But if you follow our directions closely, and backup your files, you shouldn’t run into any problems.
Did this post help you? Let us know with a comment. Thanks for stopping by.
Much needed information. Thank you very much.
[...] of memory speed, an article we wrote a few moths back may also interest you. In the article titled WordPress, Fatal error: Allowed memory size of 33554432 bytes exhausted We describe how to increase the memory alocated to [...]
Thank you for Posting & I got to read nice information on your site.
really appreciate YOU — thanks a lot!