I made a backup of a Wordpress site that has url abc.com using the Duplicator plugin. I then created a new website within CyberPanel on the same server that points to a different domain, xyz.com. With a default WP + LS Cache install, the URL for xyz.com works fine. However, after installing the backup of the original site, it is redirecting to the original URL, abc.com and any activity on the site is reflected in the abc.com database.
The Duplicator log shows that it correctly replaced any references to abc.com with xyz.com.
The DNS is with Cloudflare and doesn’t say anything about abc.com.
Interestingly, staging.xyz.com does not redirect and loads the original WP + LS Cache site that was cloned before restoring the backup.
Thanks very much. I just tried defining the url in wp-config and it doesn’t help.
I successfully installed the backup on a new server with the same domain xyz.com and with the same backup files. Yet, when I make a backup of THAT site and put it on def.com on the same server, I get the same issue - going to def.com redirects to xyz.com, so clearly there is some conflict with my actual server/cyberpanel (which I can’t easily change/replace for various reasons) and the migration.
If anyone has suggestions of what to check specifically (php, sql, permissions, etc…) and how to do so, it would be appreciated.
I assure you the siteurl matches the new domains. I’ve tested this on a new server and the problem persists.
It seems to have something to do with the specific site that I’m cloning, and presumably the database. When I use Duplicator to copy a stock WP site on the same server, I don’t get these problems.
Fortunately my site isn’t live, so I’m going to try rebuilding it from scratch today - fresh OS and cyberpanel install, config server packages, install fresh wp site, copy all the plugin and theme folders and let it create a new database. I want to move hosts anyway, so its a decent opportunity to get set up better
I think I’ve isolated the issue to Redis. I hadn’t appropriately updated the connection details in WP-config so the new site was loading cached files from the old site. I forget how to properly configure it, so am currently refreshing my memory. But the problem goes away when I stop the redis service via SSH.
Interestingly, I was getting success today by adding
I changed the WP_CACHE_KEY_SALT from the gibberish salt key that was there already to the domain name of the site. This should allow for future Duplicator migrations to change it automatically. If not, at least it will be clear that it needs to change and to do so.