Wordpress: redirecting to my old public ip
I started to develop my own wordpress site, that I hosted locally. I am using Apache for hosting and mariaDB for DB. I accessed the site through my public ip, that in my case was was xxx.xxx.1.163. I could also access my site thorugh 127.0.0.1. I set the wordpress site up and everything worked fine.
PROBLEM
Until I moved from one place to another with my computer. Now I can not access my site anymore. I have been struggling with the problem for 2 days now. Now my public ip is xxx.xxx.1.110. Problems that occur, when I try to access site:
Accsessing through browser
When i try to access through 127.0.0.1, then it automatically redirects me to xxx.xxx.1.163, although I have erased all the Firefox cache, history and cookies.
When i try to access through xxx.xxx.1.110, then it also redirects me to xxx.xxx.1.163
I have tried the same in Chrome also. Results are the same.
What I have tried and outlined:
Apache working fine - When I have only apache's index.html file in /var/www/html directory, then I am able to access the default Apache page through 127.0.0.1 and through my current public ip xxx.xxx.1.110. Like this everything seems fine.
Original wordpress - When I move original wordpress files to /var/www/html directory, then then from 127.0.0.1 and xxx.xxx.1.110 the wordpress first setup page appears. Like this everything seems also to be fine.
When I try to set up the wordpress, with the same database connection that i had the last one, then it thorws error and says Wordpress already installed. And now, when I try to connect to 127.0.0.1 or xxx.xxx.1.110 then it automatically redirects me to my old public ip xxx.xxx.1.163
When I move my own wordpress project(the project that I had before and was working) to the /var/www/html folder, then the same thing happens. I keep getting redirected to xxx.xxx.1.163
MY IDEA OF SOLUTION
My idea is that i would probably have to make some changes in my wordpress database and maybe in my wordpress conf files. But I have no idea where I should change and what I should change. I have looked it up also but I have found very different answers.
If somebody could tell me, if I am moving in correct direction or what exactly should I change, then I would be very thankful.