What Is WordPress Memory Limit?
WordPress has a 32MB memory limit by default, but some hosting providers increase this to 64MB for all customers. It’s also possible to go even bigger — all the way up to 256MB.
How To Increase WordPress Memory Limit
Method 1 – Change The WP Memory Limit Using The (.htaccess) File
- Search for your .htaccess file which should be located in the root directory of your WordPress installation. (If you can’t find it then it might be hidden. Thus, make sure to check your hidden files when locating them.)
- Open the .htaccess file with a text editor and add the following line of code:
- php_value memory_limit 256M
- Save the .htaccess file then refresh your website.
Method -2 Replace memory limit 32M with 256M
- Find or locate your php.ini file. (If you can not find it, then simply create your own php.ini file and place it in the root directory of your WordPress installation.)
- Open your php.ini file then find the line: memory_limit=32M, edit it using your favorite editor.
- Edit the (php.ini) file by adding: memory_limit = 256M or Edit (wp-config.php) file by adding: define ‘WP_MEMORY_LIMIT’, ‘256M’);
- Save your changes and reboot your localhost or server.
Why Do I Need To Increase My WP Memory Limit?
They need memory to run several applications effectively at the same time. Different programs in WP are allotted different amounts of memory limit by server administrators. This error message appears when your WordPress code needs more memory limit than the default allocated memory limitation.