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:
- In wp-config.php I changed
define('DB_NAME',...)
,define('DB_USER', '...')
,define('DB_PASSWORD', '...')
anddefine('DB_HOST', '...')
to connect to the database - In the database: click on the wp_options table and modify the values of the site_url and home column with your new URL.
- updated permalinks: Settings -> Permalinks
- In wp-config.php I added:
define('WP_HOME','http://domain-new.com');
anddefine('WP_SITEURL','http://domain-new.com');
- In my child theme in functions.php I added:
update_option ( 'siteurl', 'http://domain-new.com' );
andupdate_option ( 'home', 'http://domain-new.com' );
- I installed the plugin Search & Replace and run a Search and Replace for all tables in the database to search
domain-old.com
and replace them withdomain-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?