Memory Exhausted Issues and Fatal Errors

WordPress is a wonderful CMS, but everything has a limit!

In the case of WordPress, if you overload your installation with many plugins and themes, you may find you encounter issues such as a slow site or Memory Exhausted problems.

Wherever possible, you should remove all unwanted themes and plugins from your installation to ensure the site is as streamlined as possible.  If you have a few disabled plugins, it is better to delete them, because disabled plugins will still be using up your resources (ensure you have retained a backup of the plugin data before you delete!)

If you receive something like the following message:

Fatal Error: Allowed memory size of 56843040 bytes exhausted (tried to allocate 2560 bytes) in /home/yoursite/public_html/wp-content/plugins/example/config.php on line 350).

 

You can try to inbcrease the amount of RAM that WordPress has been allocated.

Increase The WordPress Memory Limit Using wp-config file

WordPress memory or RAM is typically different to that of the server (or hosting account) – you need to set this regardless of server memory settings.  The default is typically 32M and this can be increased by accessing your site's wp-config.php file.

1) Using an FTP program e.g. Dreamweaver or FileZilla, download your site's wp-config.php file

2) Just below the introduction header text, find where the site definitions begin and add this line at the top (it is usually not present unless it has been added already):
define('WP_MEMORY_LIMIT', '96M');

3) Save the file and upload it back to your site.

4) Check on the front end / in the admin of your site to see if the problem has been solved.  If not, repeat the above steps but chage 96M to 128M, or even 256M.  Be aware that a higher number may mean other aspects of your installation could suffer!  It's all about balance.

Further information on this can be found here: http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP


Increase The WordPress Memory Limit Using php ini file


If you have access to your PHP.ini file, change the line in PHP.ini If your line shows 32M try 64M:
memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)

Increase The WordPress Memory Limit Using .htaccess file


If you don’t have access to PHP.ini try adding this to an .htaccess file:
php_value memory_limit 64M


If you still need help


Please get in touch and we would be happy to assist.





  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Add a Post in WordPress + Video Tutorial

You might also think of a "Post" as a news item or blog article.  Although the Post editor screen...

Add a link in a WordPress post or page

In this help article, we explore how to add a web link or email link to content in your WordPress...

Add an image in a WordPress post or page

Before you begin... You may find it helpful to read the article about resizing images so that...

Resizing Images + Video Tutorial

IntroductionYour website will feature images and since you'll be managing some of the images...

Add a Page in WordPress + Video Tutorial

A page is different from a post (see other help article "adding or editing a Post")Please note:...