Skip to content

Increasing Memory Limit To PHP

Some servers (shared hosting planes usually) have a very low limit to PHP by default which can cause a blank screen (white screen of death) or an error on your site. Luckily increasing the memory limit to PHP is very simple and can be done with a small tweak in your wp-config.php file.

Have a look below at how to increase your memory limit or read the documentation on the WordPress CODEX.

Note: If you don’t feel comfortable making these modifications on your own you should be able to open a support ticket with your hosting company so they can update the server for you and fix any memory limit or internal server errors.

Increasing the Memory Limit

Open your wp-config.php file via FTP and add the following code right before it says “That’s all, stop editing! Happy blogging”:

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

You can alter the 128MB to the value you want. I personally use 256MB on my localhost but 128MB should work pretty well for most live sites.

increase-memory-limit

Note: Altering your wp-config.php file may not work if your host does not allow for increasing the PHP memory limit. If that is the case, please contact your host to increase the PHP memory limit for you.

Godaddy Users

Some of the Godaddy services actually include a setting in the c panel to alter the memory limit and editing the wp-config.php file won’t do anything so please make sure to check your admin panel first.

Back To Top