How to increase Memory Limit for WordPress site

A common problem happens to your website is “Allowed Memory Size Exhausted” error. It means your WordPress installation doesn’t have enough memory to operate. Here are some solutions you can try:

Method 1: Edit file wp-config.php

Add the following to wp-config.php 

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

(usually place under define(WP_DEBUG, true);  like this

Read more here.

Method 2: Edit file .htaccess

Make sure you back up .htaccess before you edit it. 

Add the following to .htaccess:

php_value memory_limit 128M

Method 3: Edit php.ini

Add the following to php.ini:


Read more here.

If you’ve tried all methods and still get errors, please contact your hosting administrator to resolve this issue.