WP Engine Hosting for WooCommerce
WooCommerce is the leading eCommerce plugin for WordPress. Learn how to leverage the power of this tool with the performance and security of WP Engine.
Development Best Practices with WooCommerce on WP Engine
- WooCommerce recommends adding custom code to a plugin or child theme. Child themes inherit the looks and functions of the original theme but allow you to add custom styles and functions that override them.
- Use WooCommerce’s provided hooks and filters in your theme or plugin code. These hooks and filters have been developed and tested by the WordPress community, so they’re the ideal way to leverage WooCommerce functionality.
- Keep on top of updates from the WooCommerce team. Their developers are constantly releasing updates for performance or to add features. Follow their developer blog to keep yourself up to date.
- Leverage the WordPress REST API endpoints provided by WooCommerce to safely hook into your site with any number of apps and services. Create a “headless” site or even manage a single product base across multiple sites.
Encrypt User Information
- Use secure payment gateways like Paypal, Authorize.net, and Stripe to ensure user payment information isn’t stored in your own site’s database.
- The payment gateway itself is encrypted, but the pages taking in that information should be secured too. Secure checkout and login pages, which transmit secure customer and order information, by adding an SSL.
- Read about WP Engine’s security environment and see how we’re protecting your site at a server level.
WP Engine Cache and WooCommerce Plugin
Keeping your site cacheable is one of the most important steps to ensure it can perform its best. However, caching shouldn’t impair standard and expected actions, like logging in or completing an order. We’ve taken steps to ensure your site is highly functional from the start.
Default Excluded Pages on All Sites
store
cart
checkout
check-out
If WP Engine detects the WooCommerce plugin on your site, we will automatically apply additional cache exclusions.
Additional Excluded Pages
products-compare
coupons
my-account/lost-password
wp-json/wc
wc-api
Additional Excluded Arguments
add-to-cart=.+
wp-api=.+
Additional Excluded Cookies
woocommerce_items_in_cart=[1-9]+, wp_woocommerce_session woocommerce_cart_hash woocommerce_recently_viewed Store_notice[0-9a-z]
NOTE
If you are using custom page URLs (EX: /basket
) those pages will need to be excluded manually by reaching out to our Support team.
Purge Cache
Purging server cache is essential to any developer or site manager. Learn how to purge server caches in our guide.
If you’ve updated a page but don’t want to reset all caches, purging individual page cache by URL is possible as well using the WP Engine Advanced Cache plugin.
Deploy WooCommerce on WP Engine
If you use a STG/DEV environment to test or draft changes, there are some general best practices to follow when copying between them. These steps are particularly important because your PRD store may receive orders, add products, etc. It’s important to ensure you don’t overwrite this crucial database information in Production when copying data up from STG/DEV.
If you do not intend to deploy the database to PRD, simply Copy Site as normal.
If you intend to deploy database information to PRD while also preserving database information on PRD:
- On Production; Export any order, product, or customer information you wish to keep
- Copy from Staging/Development to Production, including the database
- On Production; Import any data exported in Step 1
NOTE
We recommend placing the site in maintenance mode prior to beginning this process, so new information is not added. Be sure to lift maintenance mode again after.
What if new pages/posts were created on STG/DEV?
The easiest solution is to use the WordPress default process under Tools > Import or Export to manually migrate that content from STG/DEV to PRD so it is not overwritten and lost.
If more specific export parameters are necessary, then an additional import/export plugin will have more customizable export options.
NEXT STEP: Optimize WordPress for speed and performance