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.
if after u use define from wp-config then everything is going well
then something happen when you do migrationâŚ
php version?
permission?
sql?
etc etc etc
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 updated the authentication keys and salts in wp-config using the link provided there (which I had previously ignored). This wasnât the issue, but needed to be done anyway. https://api.wordpress.org/secret-key/1.1/salt/
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.
Iâll also leave this here for othersâ reference. If you are using the Redis Object Cache plugin, here are is the documentaiton for the connection parameters that need to be entered in wp-config. Specifically it is useful to set up and change the password. Connection Parameters ¡ rhubarbgroup/redis-cache Wiki (github.com)
I also recommend these articles for setting up redis: