If you get the memory limit error like bellow, in your WordPress site, you can update the PHP memory on WordPress, you can do one of the following ways.
1 2 3 4 5 | fatal error: allowed memory size of 5547889 bytes exhausted |
Update PHP.ini file
In php.ini file, search for the memory_limit line, and update the value:
1 2 3 4 5 | memory_limit = 256M; |
wp-congig.php file
If you don’t have access to the server setting, you can update the wp-config.php file. Open the file and add the following at the end of the page.
1 2 3 4 5 | define('WP_MEMORY_LIMIT', '256M'); |
.htaccess file
last not least, update the .htaccess file in the root of the site and add the following code:
1 2 3 4 5 | php_value memory_limit 256M |