I want to install woocommerce on my website and have selected a new theme to do so. I even upgraded from an old server to a new one running the latest version of php.
However, I still get the same fatal crash every time I activate the woocommerce plugin:
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to
allocate 64000 bytes) in home/******/*****/*****/settings.php on line
889
Is this something to do with my server settings? Can it be fixed without upgrading to yet another hosting package?
1 Answer
Your WP install is attempting to exceed the PHP memory allocated to it. This limit may be defined by WordPress, your server configuration files such as .htaccess
or php.ini
, or your host.
WooCommerce has a doc explaining a few ways to increase it. They seem to recommend 256 MB
.
WordPress does as well with some more details.
There are a few things you can try.
In WordPress:
Try adding the following to your wp-config.php
file right above the line that says, “Happy Blogging”:
define( 'WP_MEMORY_LIMIT', '256M' );
In the php.ini:
If that does not work and you have access to your php.ini
you edit the line that starts with memory_limit
to look like the following:
memory_limit = 256M ;
In your .htaccess file:
The .htaccess
can be found in the same directory as your wp-config.php
file. Add the following on a new line:
php_value memory_limit 256M
Contact your host
If these do not work you’ll need to contact your host to ask about the limits.