Increase virtual memory if plugins and WordPress installs need more

by | Blog, How to

pieces of code cut out into stripsThis  process below can be used when WordPress upgrades and plugin installs are not working due to insufficient memory being allocated. Some more information is here www.narfstuff.co.uk/2008/03/14/php-memory-and-wordpress

By default the server allows up to 32MB of data to be transferred via php. This default setting can be modified from within your account.

Within the php.ini file (either in public_html or wp-content), you will need to modify the memory_limit value. The php.ini file can be edited with any text editor. With the file open, search (ctrl+f) for memory_limit or scroll down to approximately line 232. Here you should see the following line:

memory_limit = 32M      ; Maximum amount of memory a script may consume (32MB)

Simply update this number to accommodate for a higher amount of memory. I suggest 128M. Be sure to save your changes to the file. Next open the file wp-settings.php (located within the directory you installed wordpress). Near the top of this file you will find:

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

Update this value to the new memory limit as well. Save your changes to the file. Once the file is saved, the effect should be immediate. You can now return to your Wordpress update and try again.

Note: To check and see that the memory_limit has been updated properly, you may create a new text file called info.php inside wp-includes/. How to make this file is explained here.

Then view this page in a browser (be sure to include wp-includes in the URL if this is where you placed the info.php file). You should see the Php settings including the memory_limit. This will also show the path to the php.ini file which is being used.

The WP Guy - Tony Cosentino

The WP Guy

Here to help with many areas of your WordPress needs.

The WP Guy

Website Health Check

Thorough audit of your WordPress website.

The WP Guy

Ongoing Support

Let me take care of the Website stuff so you can focus on what you do best.

The WP Guy

WordPress Training

- One-on-one WordPress training via zoom

- In-house group training