By default Shopp sessions last for 2 days. Learn how to quickly adjust this expire period.

How to Adjust the Shopp Session Expiration Time

How to Adjust the Shopp Session Expiration Time

Shopp stores order information using a technology known as PHP sessions. Each session is unique to each visitor. In Shopp, sessions are used to keep track of items in the shopping cart and any checkout details submitted.

Here is brief overview of PHP sessions as it relates to the shopping experience:

Customer Experience Session Behaviors
Customer arrives at storefront page PHP session starts
Customer browses to a product called “Blue Widget” PHP Session adds the product to the customer’s recently viewed list
Customer adds the product to their cart PHP session is updated
Customer completes the checkout PHP session is schedule for cleanup

By default Shopp PHP sessions last for 2 days. You can override this setting with a Shopp macro. Below is an example of the Shopp macro for adjusting the session period.

define('SHOPP_SESSION_TIMEOUT', 7200);

Note that the time is measured in seconds.


We know that 1 hour = 60 minutes.

Therefore 2 hours x 60 minutes = 120 minutes.

Now we need to convert 120 minutes to seconds. To do so simply multiply 120 minutes × 60 seconds which gives us a total of 7,200 seconds.

Adding the Macro

  1. Login to your website with an FTP client. FileZilla & Cyberduck are some free options.
  2. Then locate your wp-config.php file. It is usually located in the WordPress root location.
  3. Open the file for editing.
  4. Now we need to add the macro to the file. The middle of the file is generally a safe location.
  5. Enter a new blank line. Then enter your Shopp session macro.
  6. Then save changes to the file.

Be careful not to accidentally delete existing information from your wp-config.php file. Doing so could take your site offline.

Bonus Examples

Expire sessions at 1 hour:

define('SHOPP_SESSION_TIMEOUT', 3600);

Expire sessions at 4 hours:

define('SHOPP_SESSION_TIMEOUT', 14400);

Expire sessions at 1 day:

define('SHOPP_SESSION_TIMEOUT', 86400);


Lorenzo Orlando Caum is the founder of Enzo12 LLC, a consultancy in Tampa, FL.

Lorenzo provides consulting services such as a Shopp upgrade service through Shopp 101. He also recommends using managed WordPress hosting with Shopp because a faster site means more sales.

You can learn more about Lorenzo, you can follow @lorenzocaum on Twitter or check out his blog.

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.