Softadmin's picture

Hi experts.

I had an old wordpress appliance with debian wheezy and php 3.#, and the wordpress updates ask me to upgrade to php 7 I try it and could do it, so I create a backup of the wordpress and in a new turnkey wordpress appliance I restore it, howeverthe original static IP of the old wordpress was and the new one was, so after the backup and restore I change the network configuration for but  swap the IP so the users will continue using the current links, however when I use the after a couple of seconds (connecting) it redirect to and give me the error, if I go to any page in particular like, it works fine, I dont know if the problem is in the wordpress or in the apache, I run the queries in mysql to update the wp_options, wp_posts, and wp_meta.

Anyone have any idea how to fix this?


Jeremy Davis's picture

TBH, I was under the impression that WordPress had backwards compatibility all the way back to PHP v5.2.x (or similar). However, I see that as of WordPress v5.2, it requires at least PHP v5.6.20. Considering that Wheezy had PHP v5.4.x, it sounds like you were doing the right thing.

I'm curious on exactly what you have done to get to where you are. You say "I create a backup of the wordpress and in a new turnkey wordpress appliance I restore it". I assume that you used some sort of WordPress backup/restore plugin to do that? And that you are now running the latest TurnKey Wordpress appliance (v15.2 IIRC), with the content from your old server restored?

Regardless of above, the behaviour you have reported sounds very much like either a webserver config, or perhaps a WordPress config. There is also a slim chance that it could be client side (i.e. the system the web browser is running on). To completely rule out client side, you could try accessing it from a device which you haven't used it with before (that would rule out any browser/OS level caching) and/or clearing the browser cache and cookies.

Unless you've modified the Apache config yourself, that should not be the cause. The default TurnKey WordPress Apache config doesn't include any redirects, so I doubt that it's Apache doing it.

Out of interest, I just did a quick google and this seems to be a fairly common WordPress issue when migrating from one server to another. So my guess is that the old IP is stored within the DB and/or config somewhere. I found a few interesting looking StackExchange posts (see here and here) that have some good ideas. But actually, the WordPress docs on the matter look pretty comprehensive. So I suggest that you have a good read through the WordPress docs first and follow their advice. If you're still stuck, then perhaps look at some of the other ideas (and/or have a google yourself - FWIW I googled "wordpress redirects to old server").

Regardless, please let us know how you go and what you end up doing to resolve it.

Add new comment