Stacy
Stacy

Reputation: 51

Cannot get ngrok to serve up my WordPress site

I have a simple wordpress install using Mamp Free Version on OS/X.

Version 2.0.19/2.0.19
Web Interface h#tp#//127.0.0.1:4040
Forwarding h#tp#//6c219c8e.ngrok.io -> localhost:8888 Forwarding
h#tps#//6c219c8e.ngrok.io -> localhost:8888
Connections ttl opn rt1 rt5 p50
p90
1 0 0.00 0.00 6.00 6.00

For some reason when I try the links generated by ngrok, the website loads forever, then I get

Page not available.

Upvotes: 5

Views: 19690

Answers (6)

Grant
Grant

Reputation: 6329

As @Magico stated, download from the repo https://github.com/jonathanbardo/WP-Ngrok-Local and place that in your plugins directory, activate the plugin.

Then, after you get your ngrok tunnel URL up & running, take that URL and place it in your wp-config.php as follows:

define( 'WP_SITEURL', 'http://example.ngrok.io/' );
define( 'WP_HOME', 'http://example.ngrok.io/' );

Now you will be able to access the homepage as well as the admin dashboard.

Upvotes: 11

Jessie Andy
Jessie Andy

Reputation: 1

For someone who is still having an issue with ngrok on wordpress , you can follow these steps:

  1. After running ngrok copy the link and edit siteurl and home column in wp_options table

  2. Go on administration panel and then edit your menus by adding ngrok_url generated.

Upvotes: 0

Magico
Magico

Reputation: 2804

You can start ngrock setting your virtual host and your port with this command:

ngrok http -host-header=dev.yoursite 8080

and then install and activate only one of these plugin to navigate with relative urls

https://github.com/jonathanbardo/WP-Ngrok-Local (i'm using this one)

https://github.com/optimizamx/odt-relative-urls

http://wordpress.org/plugins/relative-url/

http://wordpress.org/plugins/root-relative-urls/

full article and documentation here https://ngrok.com/faq#virtual-hosts

Upvotes: 4

Madison Keller
Madison Keller

Reputation: 11

The Relative URL plugin in wordpress got my site loading correctly remotely through ngrok.

Upvotes: 1

phillipmaddox
phillipmaddox

Reputation: 392

I'm not having luck with this approach. I'm using a plugin called "Relative URL" but only the homepage is rendering on my end. Other pages in the site do not show up. The site is running locally as localhost:8888 which is the path I set temporarily in the SETTINGS>GENERAL SETTINGS and I noticed with the Relative URL plugin running it's still trying to throw the :8888 on the end of the ngrok URL. Just don't know what to do about it currently.

Upvotes: 1

Ryan Dutton
Ryan Dutton

Reputation: 51

According to the faq:

You need to add one of the following plugins to force Wordpress to issue relative URLs.

Sorry I don't have enough reputation points to post the rest of links.

Upvotes: 5

Related Questions