Increasing the memory limit in WordPress sometimes its really important to run website , because hosting provider set default memory limit is lower. the reason your website will not load properly or web site getting memory limit error. then you must need Increase the memory limit .
Let start , we can Increase memory limit by four method , you can follow any one .
1. Increase memory limit via php.ini
If you have to access php.ini then you can easily set the limit . please login your cpanel then go to file manager and find php.ini file & change the line in php.ini If your line shows 32M try 64M:
memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)
Or create a file with the name ‘php.ini’ in the directory where your WordPress site is installed & add the command :
memory_limit = 64M
2. If you don’t have access to your PHP.ini file , Edit your wp-config.php file and enter something like:
3. Modifying the .htaccess file to Increase the Memory Limit
try adding this to an .htaccess file:
php_value memory_limit 64M
4. You may contact your web hosting provider , they should increase your php memory limit .
Note : Don’t try to implement all the 4 methods at the same time.