Live Links - Disable Password Authentication

Hi everyone,

I’ve found a temporary workaround that works for me while waiting for this feature request to be implemented. Sharing in case it helps!

Disclaimer:
Please note that the following instructions involve third-party tools, and their usage may vary. Use at your own risk. I am not responsible for any issues or consequences that may arise from implementing these steps.

  1. Install ngrok globally on your computer by following the instructions for your OS here.

  2. Add the following code to your wp-config.php file:

define( 'DOCKER_HOST', $_SERVER['HTTP_X_FORWARDED_HOST'] ?? $_SERVER['HTTP_HOST'] ?? 'localhost' );
define( 'DOCKER_REQUEST_URL', ( ! empty( $_SERVER['HTTPS'] ) ? 'https://' : 'http://' ) . DOCKER_HOST );
define( 'WP_SITEURL', DOCKER_REQUEST_URL );
define( 'WP_HOME', DOCKER_REQUEST_URL );
  1. If using domain names with LocalWP, run this command in the terminal:
ngrok http --host-header='{yourdomainhere}' 80
  1. If using localhost ports, run:
ngrok http localhost:{portnumberhere}

Ngrok will provide a unique domain, creating a tunnel to access your local site without basic authentication so you can test webhooks and such.

Obviously basic authentication serves a purpose, so be careful using this workaround.

1 Like