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

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.

Topic home-url site-url ip Wordpress

Category Web


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!!).

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.