If you run an eCommerce website on WP Engine, you may have questions on best practices for your website’s success. In this article we will explain common mistakes and areas of confusion with eCommerce websites, and how our caching services work with eCommerce.
eCommerce and WP Engine
WP Engine is proud to successfully host thousands of eCommerce websites on our platform. By default, there are no additional settings or configurations needed to get your eCommerce website to work on our platform! We have many custom rules in place to fine tune our platform for your eCommerce website’s success. Read on to learn more about the custom settings.
WP Engine eCommerce Platform Settings
When you add the WooCommerce plugin to your WP Engine website, our platform automatically adds some caching exclusions to ensure your pages work as anticipated. By default, WP Engine excludes the following pages from cache:
- The wp-login.php page
- The wp-admin area
- The staging area
- Pages named cart, checkout, or check-out
- Pages using a set cookie with “wordpress_” in the name
And, when we detect your website is using the WooCommerce plugin, we add some additional cache exclusions:
- Pages using a set cookie with “woocommerce_items_in_cart=,” “woocommerce_cart_hash,” or “wp_woocommerce_session” in the name.
- URI paths with ?add-to-cart= and ?wc-api= added to the end
- Pages named products-compare, coupons, wp-json/wc, wc-api
If there are other pages which require a cache exclusion please contact our Support team through your User Portal using our 24/7 Live Chat feature.
eCommerce Sites and Staging
If you use a Staging or Development environment to draft code changes or perform testing for your eCommerce website, there are some general best practices to follow when copying between them. Remember: Your eCommerce site could receive orders and add new products between your most recent copy and now, so it’s important to ensure you don’t overwrite important data in production.
- Don’t copy database tables containing orders to production. If you are using WooCommerce, these tables include: wp_posts, wp_postmeta, wp_woocommerce_order_items, wp_woocommerce_order_itemmeta
- Don’t copy database tables containing users or user metadata to production. These tables include wp_users and wp_usermeta
- Regularly export order data from production. You can use WordPress’ Tools > Export option to export data as needed, or use the WooCommerce CSV export extension for more advanced features.
WooCommerce and Geolocation
When using WooCommerce’s built-in Geolocation feature on your WP Engine website you can experience redirect loops, as detailed in this WooCommerce post. Not to worry though – if you enable WP Engine’s own GeoTargeting add-on as well, the Geolocation feature built into WooCommerce will work seamlessly.
Your eCommerce website is an important part of your business, and should be handled with care, and with regular maintenance. We recommend a few key best practices to keep your eCommerce site in great working order:
- Keep your site secured. We recommend fully securing your website with a free Let’s Encrypt SSL certificate, and using our setting to “Secure all URLs.” Users will then access your website over HTTPS, which adds another layer of encryption so that data on your website is secured. Learn more about HTTPS on WP Engine.
- Stay up-to-date. Make sure you regularly update WooCommerce, related eCommerce plugins, and all plugins related to product sales on your website. WooCommerce regularly provides updates to improve performance and customization options!
- Test changes in staging or development first. Make a copy of your website, and test any changes you feel might impact the experience of your end user in the copied environment first. This way you won’t release any untested new features to production, or cause any unintentional issues for your customers.