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.
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.
According to the faq:
You need to add one of the following plugins to force Wordpress to issue relative URLs.
https://github.com/optimizamx/odt-relative-urls
Sorry I don't have enough reputation points to post the rest of links.
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
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.
The Relative URL plugin in wordpress got my site loading correctly remotely through ngrok.
For someone who is still having an issue with ngrok on wordpress , you can follow these steps:
After running ngrok copy the link and edit siteurl and home column in wp_options table
Go on administration panel and then edit your menus by adding ngrok_url generated.
I have a much better solution. Much much better. Download the program called "sitesucker" in order to download all files of your site from the localhost. You need to put the address https://localhost/websitename or https://localhost/wordpress, inside the SiteSucker app, if you are like me :), then you put the folder of the website you have downloaded just now, inside your localhost. This is kinda of an assembled site, because sitesucker makes requests for all pages and downloads css and htmls, and also all resources. Sitesucker, if used correctly, and legally, is a great tool. Everyone that will access to this folder after you share the link with ngrok, will see it as a normal website, assembled, not as wordpress format... if you understand what I mean.
So you share the link that brings straight to your localhost, I mean the link that ngrok have created, and people can see the website from the folder that has your assembled website, downloaded previously from SiteSucker :)
DONE
Related
I have setup a simple wordrpress environment with ddev.
I am trying to use the ddev share function which should give out
a live preview of the local WP site but when I try visiting the site from another
computer on a different ethernet then the site loads up, all in regards to html and some
primitive css but not the whole thing.
Locally ofcourse everything loads well.
In my console of the ngrok site I get various warnings like such:
Loading failed for the <script> with source “https://mysite.ddev.site:8443/wp-includes/js/jquery/jquery.min.js?ver=3.5.1”.
Note, the "mysite.ddev..." is the link to my local environment, So my guess is that this is to do with something regarding relative/abs urls, but I am unsure on how to fix this
I reffered to this post from 5 years ago which kind of touches on the subject.
I installed "Absolute Relative URLS" but that didnt solve the problem.
The problem with WordPress is that it embeds static URLs right into the database, so it's far harder to use in situations where you either change the hostname or do anything else. This is a significant problem with WordPress, and there are many workarounds, but not very satisfactory ones.
The article DDEV share: Sharing a DDEV-Local project with other collaborators in real time explains how to use a stable subdomain and do a search-replace.
WordPress only has the one base URL, but the wp command is built into DDEV-Local’s web container.
This set of steps assumes an ngrok subdomain of “wp23” and a starting URL of “https://wordpress.ddev.site“.
Configure .ddev/config.yaml to use a custom subdomain: ngrok_args: --subdomain wp23
Make a backup of your database with ddev export-db or ddev shapshot
Edit wp-config-ddev.php (or whatever your config is) to change WP_HOME, for example, define('WP_HOME', 'https://wp23.ngrok.io');
ddev ssh
wp search-replace https://wordpress.ddev.site https://wp23.ngrok.io
(assuming your project is configured for https://wordpress.ddev.site and your ngrok_args are configured for the wp23 subdomain)
Now ddev share
After a bit experimentation I've found a solution.
This post is a bit old thus DDEV has added some additional
upgrades to it's Wordpress Environment, this solution is tested on:
ddev -v:
ddev version v1.16.7
Solution:
Install and Activate Relative-Url Plugin
For good measures, restart the DDEV site ddev restart
Into the terminal Write:
ngrok http -host-header=rewrite .ddev.site
If you're not sure what your projects/site name is, use
ddev describe
and underneath the URLS the first link that will lead you to your
localhost site should be the URL you insert into your ngrok rewrite
I have a problem with moving my wordpress website from Localhost to Webserver .. In the server, I have an old website (wordpress to) .. so when i finished uploading the website I edited the wp-options siteurl and wp-posts guid from "Localhost:4455/ruepress" to "mydomain.com/ruepress2" because i have already another website exactly in the public_html directory .. when i enter to my website it loads the page but some pictures doesn't appear .. and when i click on an articles it redirects me to the old website and it shows the coming soon page (because i made the old website on under-construct mode) .. so whats the problem ? i think the problem is in the siteurl but I changed it ?
+1 for:
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
However, if you do not wish to use that rout for any reason, I can suggest an easier option:
On your local site, install this plug-in:
https://wordpress.org/plugins/duplicator/
Next, generate a Duplicator package (via the plug-in's menu on wp-admin dashboad).
Once the package is generated, download the two package files (installer.php and the archive/zip file) to some folder on your PC. Next, upload these two files to the live site folder where you wish to create the site. Next, open the following link in your browser:
http://{your_domain}/{folder}/installer.php
and follow on-screen instructions. Your site should get created and everything should work fine.
This is a very common issue. You have to change all URLs in the database, not just wp_options, i.e. in post/page content, widgets, theme options. and more.
Try interconnectit.com WordPress Serialized PHP Search Replace Tool. It's specifically made for this. And see Moving WordPress « WordPress Codex, which mentions the same Interconnect script.
Use the developer tools in Firefox (or Firebug) or Chrome or Safari or IE to check the path of the missing images before and after using the script.
I just finished building my basic website using wordpress and wamp. installation directory is at C:\wamp64\www\wordpress and i'm currently accessing my site at localhost/wordpress
now i have 2 problems:
1. how can i trick my localhost to use http://www.tracking-site.com instead of localhost/wordpress? I tried changing site and wordpress address but all i get is page not found.
after changing my url, i am planning to access my local wordpress (which will now be http://www.tracking-site.com) from another PC.
2a. do i need to copy all the wordpress files to pc#2?
2b. do i need to install wamp to pc#2?
edit: i can skip problem #1 if changing site url is not important. cause my main target here is to access my localhost wordpress from another PC with same LAN. I tried adding tracking-site.com in hosts file to redirect to 127.0.0.1 then in PC#2 added in hosts file 192.168.x.xxx (my ip) then tracking-site.com. not working tho.
I don't want to host it online because my website will only be used internally in my workplace.
This should work, haven't done it in Windows in forever.
Set your site to a different URL, this is probably a bad idea honestly since WP hardcodes a lot of urls like the images, you can get past this by using wp-cli.phar to search and replace in the db but that's not a simple procedure either.
That being said it can be done.
Right click Notepad and open as administrator.
Click Open and change the file type to all files.
open the following file: c:\Windows\System32\Drivers\etc\hosts
Add the following line: 127.0.0.1 www.tracking-site.com
Question 2. Is answered here: How to access my localhost from another PC in LAN?
Have successfully moved my WordPress website from my localhost to a live server but the images are not showing and some pages as well. Some pages are still showing the localhost URL while another error message am getting is "That page can't be found".
I already changed my siteurl and Home column in my database table (wp_option) to the live server, but still the images are not showing yet. What should I do?
You have to replace all localhost url in your database.
You should follow the steps below to move your database from local to live server:
Export your database to sql file
Use notepad++ open that sql file
Replace all localhost url to your live domain and save the file
Import the saved file to the live database
Note: make sure that you uploaded all the images to the live server
I would definitely recommend to use an automated plugin for the task. The one I use is Duplicator, by LifeInTheGrid. It is free and works perfectly to move a site from development to production and viceversa. Here is the link to it:
https://wordpress.org/plugins/duplicator/
I use it with all my sites and so far it has worked flawlessly.
I finally discovered a wonderful plugin that did it all.
The plugin is called Velvet Blues Update URLs .
Just Download the package. Extract it to the "plugins" folder of your WordPress directory. In the Admin Panel, go to "Plugins" and activate it.
Go to Tools -> Update URLs to use it and then tick all the boxes to replace the old URLs with the new URLs.
I have a 32bit Win7.
I am trying to set Wordpress 4.1 up to work on Wampserver 2.5.
I copied the extracted wordpress files into my own folder within the c:wamp/www folder. But after going to the localhost page, clicking on my folder under 'Your Projects' opens to a 'This Page Is Not Available' page, which cites either non-connectivity (not the case), or misconfigured network, or unresponsive DNS network or firewall issue.
I tried looking this up but nothing. Pls let me know how to fix this.
Alternatively I tried localhost/myfoldername in my browser, and the Wordpress installation begun with language selection and then the 'lets go' button, then the form to be filled out.
Can I proceed this way or would it involve issues later
Check the URL it tries to redirect you, probably gives you just "wordpress". Not sure if it's a bug in WampServer index.php or something that needs to be configured, just type http://localhost/wordpress (or how your wp folder is named) to your browser?
I had a bit similar problem. It can be by using bad folder to enter your page.
1) You have only wordpress or anything else on your server? If the other pages are ok, i will try jylipaa's option. If it doesn't try to change localhost for 127.0.0.1:8080 or 80 - that port is standard for wamp, xampp, or vertrigo.
2) All pages doing it? This question can be rather non-relating but do you use skype? IF yes, it often happened that skype roguely take port 8080 for himself and don't let you know that. Try to configure your wamp to another port and use http://localhost:81/ for your instalation. That was option i tried and now everything is ok.
Hope this will help.