WordPress has eCommerce plugins which grant you the ability to use WordPress as a shopping cart. By default, the eCommerce plugin doesn’t save products to the Shopping cart; once the shopping cart is visited after products were added, the site would still tell you that the cart is empty. This is because the Sessions save path (session.save_path in the php.ini) is not set to the right directory.
Known issues with ecommerce plugins
This issue is known to happen with the following WordPress eCommerce plugins.
- WP Ecommerce
- Woo Commerce
In this tutorial we will teach you how to fix the sessions path in your cPanel File Manager.
Fixing the sessions problem
The sessions save path is simple to fix using the cPanel File Manager. In order to allow the shopping cart to have products added to it, you will have to repair the sessions path to the folder location on the server where the sessions are stored.
Step 1: Log into cPanel,
Step 2: Go to the File Manager and choose the ‘Web Root public_html’ directory before clicking ‘Go’.
Step 3: Look for your ‘php.ini’ and modify it.
Step 4: Change the ‘Sessions path’ in the ‘php.ini’ for the WordPress Shopping Cart
Step 5: Then, update the ‘php.ini’ save path which sits similarly to the following.
session.save_path = /tmp
Replace it with the following.
session.save_path = home/username/session foldername
Step 6: It is important to note that you will have to create a folder in your ‘Home’ directory. Change the name from ‘foldername’ to the one you’d like for the folder and the ‘username’ to your cPanel username.
The folder has to be writeable with 755 permissions.
Step 7: Save the changes to your ‘php.ini’
Now you can test your eCommerce shopping cart once more, products should now be saved in the cart.