If you encounter the “Allowed memory size exhausted” error, increase the WordPress memory limit. Add the following lines to your wp-config.php file before the “That’s all, stop editing!” line. For more on optimizing wp-config.php.
define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );WP_MEMORY_LIMIT affects the frontend and WP_MAX_MEMORY_LIMIT affects the admin area. If the change does not help, your hosting provider may enforce a server-level limit.