Changed my pc's IP but site redirects to old IP?
Posted by: figuringoutWAMP (---.socal.res.rr.com)
Date: September 27, 2020 09:47PM

Hi all smiling smiley

My local test server was working really well, and I could access via my local IP fine from all computers:

[192.168.11.124]

Or I could access from my local machine by just typing "localhost". And I could also type in "localhost/mysitename" or "[192.168.11.124]; and it worked great.

I followed the instructions for WAMP on this site, which made me setup up a VirtualHost for "mysitename" which I did ages ago, and it works too.

THE PROBLEM has come because I had to change my home router setup etc etc, and now my local computer is [192.168.1.12]

I have restarted everything etc, and Apache etc is working great. I can access the route site, at:

[192.168.1.12]

But when I try to go to my site's subdirectory, it somehow remembers the OLD ip address!

I try to go to [192.168.1.12] and EVERYTIME it goes to [192.168.11.124]

I've looked everywhere I could (including the httpd.conf and httpd-vhosts.conf files), and I can't figure out WHERE that reference to the old IP is!

Anyone able to help?? :-)

Re: Changed my pc's IP but site redirects to old IP?
Posted by: figuringoutWAMP (---.socal.res.rr.com)
Date: September 27, 2020 10:31PM

I've solved it. It was an issue with a HARD CODED ip address - that had been entered into my site's wp-config.php by mistake. It wasn't dynamically pulling that information from the database (and the database had it correct - it was 'localhost').

Thanks all!

Sorry, only registered users may post in this forum.