Transfer website to another domain

Started by BrettUK, Aug 18, 2022, 10:53 AM

Previous topic - Next topic

BrettUKTopic starter

Hi! Transferred the website (WordPress) to another domain within the same hosting. I seemed to do everything according to the instructions (created a new DB, changed the data to new ones in wp-config, robot.txt and redirected from the old domain to the new one in .htaccess (though then the entered data disappeared somewhere)). But the transfer does not seem to be complete.

The fact is that if I leave the old domain attached to the site, then when you open some page at the old address, it opens. Only when a new page is opened, the website is already opened on a new domain.

And if you detach the old domain, then the website is not redirected from the old to the new address at all, but simply does not open.

Can you please tell me where I messed up?


Another (last) question: should the old domain be detached from the website and leave only the new one, or should both domains be available (attached to the site on the hosting) during the transition?
  •  

tevez

try like that:

RewriteCond %{HTTP_HOST} ^meggido\.com$ [NC]
RewriteRule ^(.*)$ https://checkingsites.com/$1 [R=301,L]

And add above #BEGIN Wordpress code like this:

<IfModule mod_rewrite.c>
Rewrite Engine on
RewriteBase /

RewriteCond %{HTTP_HOST} ^meggido\.com$ [NC]
RewriteRule ^(.*)$ https://checkingsites.com/$1 [R=301,L]
</IfModule>


Between #BEGIN and #END it is better not to write anything, as I said, it will be erased somehow, just click "Save" in the "Settings".
  •