Skip to content

Instantly share code, notes, and snippets.

@nkb-bd
Last active February 19, 2024 07:27
Show Gist options
  • Save nkb-bd/635ec0ee5f29f57f5508d294a5778303 to your computer and use it in GitHub Desktop.
Save nkb-bd/635ec0ee5f29f57f5508d294a5778303 to your computer and use it in GitHub Desktop.
Valet Share for WordPress using ngrok
//Share a public live url of you local site
// First setup ngork you will need an account
//add these to wp-config.php
$_SERVER['HTTPS'] = 'on';
define('WP_SITEURL', 'https://' . $_SERVER['HTTP_X_ORIGINAL_HOST']);
define('WP_HOME', 'https://' . $_SERVER['HTTP_X_ORIGINAL_HOST']);
$_SERVER['HTTP_HOST'] = $_SERVER["HTTP_X_ORIGINAL_HOST"]; // Valet share hack
//For herd : ngrok http https://forms.test --host-header=rewrite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment