• Get In Touch
July 29, 2019

How to increase the memory limit in WordPress

Using Wordpress? Get our lightening fast Wordpress Optimised Hosting.
Get Wordpress Hosting
Do you need to increase the memory limit in WordPress? Getting an error about memory Exhausted? The memory limit is one of the most common WordPress errors as the default limit of memory in WordPress is only set to 64mb! But there’s good news! The Memory Exhausted error is one of the easiest to fix by increasing the default memory limit in WordPress.

What is WordPress Memory Exhausted Error?

WordPress is written in PHP, a server-side programming language. PHP has a default memory limit, but to get this limit beyond 64MB you will need to update the WordPress memory limit. This limit is important to allow your WordPress plugins and themes to function properly. When your installation of WordPress requires more than the default 64MB of memory, You will see the following error:
  1. Fatal error: Allowed memory size of 3345435452 bytes exhausted (tried to allocate 2348617 bytes) in /home/website/public_html/wp-includes/plugin.php on line xxx
A screenshot of the WordPress memory exhausted error

How To Increase The Memory Limit in WordPress

To increase the default WordPress memory limit, you will need to find and edit your wp-config.php file. With our WordPress hosting, you can login to your cPanel control panel and use the file manager to edit the file directly. You can also use FTP to connect to your site and go to the public_html folder and download the file, edit and upload. When editing the wp-config.php file, just after the line
  1. ‘That’s all, stop editing! Happy blogging.’
Add the following code:
  1. define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
This code tells WordPress it can use a PHP memory limit of 256MB which gives much more headroom than the WordPress default memory limit of 64MB. Once this code has been added and saved/uploaded you can instantly try the WordPress site again and the memory exhausted error should stop appearing. Note: If this coding fix does not work for you, then this means your web hosting service provider does not allow WordPress to increase PHP memory limit. You will need to ask your web hosting provider to increase your PHP memory limit manually.
Using Wordpress? Get our lightening fast Wordpress Optimised Hosting.
Get Wordpress Hosting

Share this Article!

Related Posts

5 Website Hosting Solution Trends for 2022 and Beyond

5 Website Hosting Solution Trends for 2022 and Beyond

Looking for the right web hosting solution for your website can be an intimidating task. Options nowadays are more diversified than ever, and each year brings new developments in the web hosting market. If you have no clue of what to look out for, you can find yourself overwhelmed with the choices. Hence, you must […]

64 Content Marketing Statistics Demonstrating the Power of Content

64 Content Marketing Statistics Demonstrating the Power of Content

Content marketing continues to be one of the most valuable tools for today’s online businesses. With content, you can improve your chances of reaching your target audience, boost your search engine standing, and even unlock new opportunities for sales. The more content you produce, the more you can strengthen your domain authority, demonstrate your thought […]

53 User Experience Stats for 2022

53 User Experience Stats for 2022

User Experience (UX) is one of the most crucial factors to consider in web design. As the number of websites and applications in the world today continues to accelerate, businesses are under more pressure than ever to impress customers straight away. If a user visits your website and finds slow-loading pages, clunky navigation, or errors, […]

How to increase the memory limit in WordPress

How to increase the memory limit in WordPress

Do you need to increase the memory limit in WordPress? Getting an error about memory Exhausted? The memory limit is one of the most common WordPress errors as the default limit of memory in WordPress is only set to 64mb! But there’s good news! The Memory Exhausted error is one of the easiest to fix […]

All in One WordPress Migration Vulnerability

All in One WordPress Migration Vulnerability

A vulnerability has been discovered in the “All In One WordPress Migration” WordPress plugin. All versions earlier than, and including 6.97 contain a vulnerability which allows Cross-Site Scripting (XSS). With over 2 million active installations, this vulnerability has the potential to be high impact, however, this is lessened by the nature of the vulnerability, which […]