Reputation: 272
I'm trying to display a wordpress site to a customer using ngrok.
I tried using different comments.
first of: ngrok.exe http 80
this works i see the folder where all my sites are in.
Ngrok
website 1
website 2
website 3
but when i target my wordpress website the domain changes to localhost/website1 making it impossible for the customer to see his website.
i tried setting the root of my wordpress to my custom ngrok domain. this makes it kinda work, except for the images and assets that cant seem to find their location anymore.
also i tried installing the wordpress plugin (ODT relative urls). this also broke more then it fixed.
I tried using diffrend ngrok comments, they worked but didn't change a thing.
If it is any help, i use xampp to make my files to a localhost server.
in short -
ngrok display localhost/WEBSITE instead of the desired NGROK_LINK/WEBSITE
Upvotes: 2
Views: 7963
Reputation: 11
This is an old question, but you can also do this with a simple change to the wp-config file.
Comment out these lines:
//define('WP_HOME','http://localhost');
//define('WP_SITEURL','http://localhost');
And add these:
define('WP_HOME','https://YOURNGROKURL.io');
define('WP_SITEURL','https://YOURNGROKURL.io');
Once you're done testing, switch it back to return things to normal.
Upvotes: 1
Reputation: 272
Problem was wordpress home url was set to localhost, when loading the new url it redirected back to localhost from the database wordpress home property.
Upvotes: 4