How to Increase PHP Memory Limit for WordPress

2014-03-13 09:29 Posted by: Niko Hoo in , , , Go to Comment

Well, if you see below error when using WordPress, which means you need to increase the memory limit for WordPress. Fatal Error: Allowed memory size of xxxxxx bytes exhausted

As a CMS written using PHP, the memory of WordPress could use in each request is limited by PHP memory_limit. The minimal value to run WordPress smoothly is 32MB, however, if you install a lot of plugins or insert large image in your blog, then you need to increase this value to 64MB or even 128MB.

You could refer to How to Increase PHP Memory Limit to know how to increase it at system level. And in below, we will share some simple ways, via which you only need to modify the configuration of WordPress and then increase PHP memory limit at running time.

Altering PHP Memory Limit via wp-config.php

For this method you won't have to create any extra files in your directory.  Add the following code (below) to your wp-config.php file to increase your PHP Memory Limit to 64MB.

define('WP_MEMORY_LIMIT', '64M');

Changing PHP Memory Limit via install.php

This way is also very simple, all you need to do is to modify install.php file and place the following code to it:

ini_set('memory_limit', '32M');

install.php file is located in wp-admin folder.

Fail to Increase PHP Memory Limit for WordPress

This is possible since your Web Host might limit the maximal PHP memory_limit at system level so that your modification during running time might fail. In this case, contact your web host and ask for the change, or you need to find a new WordPress hosting solution which allows for larger PHP memory limit.

Tagged with:

Related Articles

Why Host4ASP.NET Should Be Your Best Choice For ASP.NET?
10/11
With an increasing number of ASP.NET hosting providers emerged one after another, choosing a reliable, affordable ASP.NET hosting service becomes another difficulty for web designers, developers, as well as businesses. Given that, in this article, we are going to introduce Host4ASP.NET as the best choice for ASP.NET.
Bisend Reseller Hosting Review
10/10
Based in Hong Kong, China and Chicago, U.S., Bisend (www.bisend.com) is new face in the web hosting industry but with great energy.
Rackspace to Acquire Its Rival Datapipe for Multi-Cloud Heft
09/12
Rackspace, one of the largest managed cloud computing companies in the world, yesterday announced an agreement to purchase its managed services rival Datapipe, so as to expand its multiple clouds’ management capabilities at scale.
Bisend WOW! Acquires HK Hosting Provider ZhuJi91
08/18
The web hosting provider Bisend.com announced early this month that it has entered an agreement to acquire Hong Kong hosting provider ZhuJi91.com.hk. The terms of the transaction were not disclosed.
GoDaddy Shutters Its Cloud Servers Services … Again
07/25
The global Domain name registrar and web hosting service provider, GoDaddy now is getting rid of its public cloud services which is based on OpenStack and only was launched 16 months ago.
Comment
Be the first to comment!
About the author
Views: 241478
Articles: 92

Author's Hot Articles

godaddy
hub

Hot Posts

Service Recommendation

Cloud Hosting
Cloud hosting is the fastest growing hosting solutions in the industry. »
Cloud Storage
Best Cloud Storage are named based on customer and expert reviews. »
SSL
The most popular SSL certificate providers in the industry are here. »
China Web Hosting
Find out a comprehensive evaluation to the host service provider in China. »
bluehost