Ngrok is a brilliant helpful CLI instrument which allows you to expose your localhost HTTP servers to an internet-facing HTTPS endpoint, at no cost!
You will get it right here: https://ngrok.com/.
I have been struggling to discover a good, brief tutorial on the best way to make it work correctly with my native WooCommerce retailer, so hopefully you’ll discover this beneficial:
1. Set up the ‘Relative URL’ plugin
First off, guarantee that your WordPress web site points relative URLs by putting in this plugin: Relative URL.
2. Make WP serve itself through your tunneled hostname
Add the next strains on the finish of your wp-config.php
file:
outline('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
outline('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
3. Instruct ngrok to rewrite the host header
Add --host-header=rewrite
to your ngrok command.
For instance:
ngrok http --host-header=rewrite http://localhost:8080
Accomplished 🎉
P.S: If you happen to’re a WooCommerce retailer proprietor and wish to simply sync it along with your Google Sheets, check-out our fast information on the best way to do it.
Initially posted right here.