Getting Wordpress to work on ngrok


  • | 910 points

    So I have a Wordpress on Laragon, everything works if I use https://localthost/lncom

    Now, I need to use ngrok. But ngrok on localhost will give me links that point back to https://localhost/lncom
    I tried using the .test domain, but only https://lncom.test works, any other pages give me:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator at admin@example.com to inform them of the time this error occurred, and the actions you performed just before this error.
    More information about this error may be available in the server error log.
    

    My guess is that I need to change wp-config.php, I have tried:

    define( 'WP_SITEURL', 'https://localhost/lncom' );
    define( 'WP_HOME', 'https://localhost/lncom' ); // works
    define( 'WP_SITEURL', 'https://lncom.test' );
    define( 'WP_HOME', 'https://lncom.test' ); // links point back to localhost/lncom
    define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST']);
    define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST']); // links point to localhost root /www folder
    

    Lastly, the odt-relative-urls plugin gives me this error on every page:

    Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in D:\laragon-portable\www\lncom\wp-content\plugins\odt-relative-urls.php on line 39
    Warning: file_get_contents(): Failed to enable crypto in D:\laragon-portable\www\lncom\wp-content\plugins\odt-relative-urls.php on line 39
    Warning: file_get_contents(https://localhost/lncom/?odt_autoload=1): failed to open stream: operation failed in D:\laragon-portable\www\lncom\wp-content\plugins\odt-relative-urls.php on line 39
    

    What should I do?


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.