[WooCommerce] Will My Staging Site Be Able To Connect With QPilot?
In order for 3rd party services that integrate with the WooCommerce REST API (like Autoship Cloud powered by QPilot), to securely connect and function properly, each site must belong to a unique and secure URL address.
In the case of testing an API connection or integrated 3rd Party service with a staging site, the staging site must belong to a unique URL in order to function properly.
Many Wordpress Hosting providers will enable you to create a staging site that belongs to a secure subdomain URL like: https://mysite.staging.myhostingcompany.com
These types of subdomain URL's generally work well because the staging site has a unique and secure URL that identifies the staging site as a separate site from the production site.
Note: the staging site must not be blocking visitors or traffic to the site, otherwise the API connection will not be allowed. If your need to whitelist the QPilot API's IP Address because of a firewall securing your site, please see this help article.
What Types Of URLs Are Not Successful?
- Subdirectories of an existing site like https://mysite.com/staging-site can be problematic because the ../staging location is only a subdirectory which still shares the domain (the "root" domain) with the site https://mysite.com/
- Connecting subdirectories will generally result in problems because the API connection will still resolve to the site root
- Insecure / non HTTPS site URL's
- Insecure URL's like http://mysite.com will have problems handling secure requests and should never be connected
Who Can Help Me Setup A Proper Staging Site?
Your WordPress hosting provider can usually help set up a staging site.
A good staging site will belong to a unique and secure URL and will also be a duplicate (or very near duplicate) of your production site. This enables you to safely test changes and updates to your staging site before applying changes to your production site.
For best practices about testing changes and updates to a WooCommerce site, please refer to this WooCommerce help doc: How to Update WooCommerce and look specifically under the heading: Testing Updates.
Example Staging Setup with WP Engine
Step 1: convert site from single to multi-environment (You want to use the same site name and select the environment the site has > usually production)
Step 2: Enter site's overview and add staging environment. You can select "copy from existing" in from the tabs. Fill out:
- site name (for url)
- Environment to copy from
- Specific backup point to copy from (use most current working version)
You can now see both sites (with unique URLs) from your sites dashboard. Testing and updates can be done now on staging before implementing on production