Reputation: 13886
I just migrated a Wordpress site from one domain (domain-old.com) to another (domain-new.com). The problem is that the homepage: domain-new.com is redirected to: domain-old.com
It only happens with the home page. The other pages like: domain-new.com/some-page
, domain-new.com/other-page
, etc. work fine.
What I did so far after migration of files and database:
define('DB_NAME',...)
, define('DB_USER', '...')
, define('DB_PASSWORD', '...')
and define('DB_HOST', '...')
to connect to the database define('WP_HOME','http://domain-new.com');
and define('WP_SITEURL','http://domain-new.com');
update_option ( 'siteurl', 'http://domain-new.com' );
and update_option ( 'home', 'http://domain-new.com' );
domain-old.com
and replace them with domain-new.com
I don't know what else can I do. I think the problem is in the htaccess, but in there I just have this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I have no cache plugin enabled. What am I missing here?
Upvotes: 1
Views: 2424
Reputation: 56
Try clearing your cache, or flushing your dns.
If it is working fine in a different browser/incognito mode etc, then it will simply be a cache issue, in which case just wait it out for it to clear.
Upvotes: 1
Reputation: 53
You should add some updates to database
UPDATE wp_options SET option_value = REPLACE(option_value, 'http://olddomain.ru', 'http://newdomain.ru') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = REPLACE(guid, 'http://olddomain.ru','http://newdomain.ru');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://olddomain.ru', 'http://newdomain.ru');
You don't need do anything to move your wordpress instead of this changes.
Upvotes: 0