I have a few questions for a local copy of a WooCommerce site and how it should be set up for local testing.
After successfully importing the database using AdminerEvo, there’s at least a couple of things I know I have to do.
- Modify or add wp-config.php
define()
functions to make sure it works locally. The ones I make sure exist look like the following:
define( 'WP_HOME', 'https://example.local' );
define( 'WP_SITEURL', 'https://example.local' );
define( 'WP_ENVIRONMENT_TYPE', 'local' );
define( 'JETPACK_DEV_DEBUG', true );
Jetpack’s documentation says that WP_ENVIRONMENT_TYPE
should be set to staging
or development
for it to provide minimum functionality, but the Local app uses the default value of 'local'
. What issues would I run into by not using 'local'
?
- I have to use USPS’ API using USPS Shipping Method to get shipping rates for orders. For some reason, this isn’t working locally. Unfortunately, I get one of two debug errors.
USPS REQUEST FAILED. Error message(s): Array
(
[0] => cURL error 28: Resolving timed out after 10001 milliseconds
)
or
USPS REQUEST FAILED. Error message(s): Array
(
[0] => cURL error 6: Count not resolve host "secure.shippingapis.com"
)
Maybe I’m missing something, but could it be that because this is a local environment, the host can’t resolve?
Ultimately, I haven’t found much relevant documentation involving WooCommerce on a localhost.