I used to host a word press blog and a forum on a server (srv71) with a domain name. And a few days ago I transferred my whole site to a new server (srv14) but I havn't updated my dns and I've shutdown the former server srv71. So visiting my.domain.name/blog or my.domain.name/phpbb would lead to time out error. I tried to connect my new blog and forum using the IP address and this problem occurred.
Visiting the forum is fine (my.ip.addr.14/phpbb) but the blog would try to redirect me to my.domain.name/blog, not my.ip.addr.14/blog.
I looked into the wp-config.php and found this line:
define( 'DOMAIN_CURRENT_SITE', 'my.domain.name' );
I thought I got it and replaced 'my.domain.name' with 'my.ip.addr.14', then visiting my.ip.addr.14/blog wourd return an establishing database connection error (all the database, username, password, hostname are correct in wp-config.php, I'm certain of that).
Then I commented out this line, leaving it as default. Then again my.ip.addr.14/blog redirected me to my.domain.name/blog.
Then I backup my blog database, deleted .htaccess and wp-config.php, and reinstalled and generated new .htaccess and wp-config.php files. Now my.ip.addr.14/blog would show a empty blog with 'hello world', the first post by default. Then I imported the database and again my.ip.addr.14/blog redirected me to my.domain.name/blog. I checked the 'wp_' tables such as wp_options and wp_site but found no manually set values (all NULL) about the site url.
The newly generated .htaccess is identical to the former .htaccess file. The former wp-config.php is 8 line longer than the newly created (default) wp-config.php:
define('WP_ALLOW_MULTISITE', true);
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', false);
$base = '/blog/';
define( 'DOMAIN_CURRENT_SITE', 'my.domain.name' );
define( 'PATH_CURRENT_SITE', '/blog/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
Any one has dealt with similar problems? Thanks!