Local WooCommerce staging site

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.

  1. 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'?

  1. 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.

Hi @firefox

  1. You can safely change this if you want to. More details on this here:
    WP_ENVIRONMENT_TYPE set to local in wp-config automatically on site start - #2 by nickc

  2. Just doing some searching this seems like a common issue for other Devs so I don’t think it’s Local specific. You might have to check around to see if there are any tips regarding this: