最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

home url - I changed the site address and wordpress address from localhost to my ip and it doesn't work anymore

programmeradmin1浏览0评论

The problem: I'm running wordpress locally on a mac using mamp. I used to access my wordpress site with localhost:8888/mysite. I wanted to let other people see it using my IP address so I went under SETTINGS-GENERAL in Wordpress and changed the "Address URL" and "SITE URL" from 'localhost' to my IP address. I tried to reach the site with myIP:8888/mysite and it's broken. I tried to reach it through localhost:8888/mysite and it automatically redirects the browser to myip:8888/mysite. I cannot access my site anymore. What can I do?

Thank you all.

EDIT: I tried to change the siteurl and home option_value in the database putting localhost instead of my ip but it still doesn't work: by reaching localhost:8888/mysite it automatically redirects me to myip:8888/mysite.

The problem: I'm running wordpress locally on a mac using mamp. I used to access my wordpress site with localhost:8888/mysite. I wanted to let other people see it using my IP address so I went under SETTINGS-GENERAL in Wordpress and changed the "Address URL" and "SITE URL" from 'localhost' to my IP address. I tried to reach the site with myIP:8888/mysite and it's broken. I tried to reach it through localhost:8888/mysite and it automatically redirects the browser to myip:8888/mysite. I cannot access my site anymore. What can I do?

Thank you all.

EDIT: I tried to change the siteurl and home option_value in the database putting localhost instead of my ip but it still doesn't work: by reaching localhost:8888/mysite it automatically redirects me to myip:8888/mysite.

Share Improve this question edited May 10, 2020 at 18:00 Masiar asked May 10, 2020 at 17:47 MasiarMasiar 1134 bronze badges 3
  • 1 Clear the browser cache or try another browser. And also [with having a backup] try with deleting the .htaccess, it will automatically be created when the permalinks is refreshed from Settings > Permalinks. – Mayeenul Islam Commented May 10, 2020 at 18:24
  • 1 Oh gosh. I deleted the cache right before doing some other stuff and that was it. I tried with Firefox and it worked!! Thank you so much :) – Masiar Commented May 10, 2020 at 18:32
  • 1 You can add your journey as an answer to this question here for others with the same issue. Good luck! – Mayeenul Islam Commented May 10, 2020 at 18:34
Add a comment  | 

1 Answer 1

Reset to default 0

So. In the end it was enough to change the address in the database. In the table wp_options there are the two entries pointing to the url that were set. By modifying those it should work. Unfortunately Chrome does some mumbo jumbo with redirects etc. and it kept pointing it to the old url. Testing it on another browser and/or clearing the cache did the trick.

Thanks to @Mayeenul Islam that pointed it out! He also suggested deleting .htaccess but I didn't trust myself enough to do it :P so if anybody has some similar issue they can try that too (remember to back it up!!).

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论