Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Multi site nightmare headache WordPress

  • SOLVED

I am having a hellish time moving over a multisite site. It once had 15 blogs. Now we are moving to a new server. It used to live in a sub-folder called "/blog". Now it is moving to a sub-domain called "blog.domain.com".

I know I have to change the url address in the database, but where? I did find the site url in the options table, and I changed it there, but that is apparently not enough.

I keep getting an infinite redirect loop. Have already tried "sunrise" as a solution, as that is what is recommended elsewhere on the web. That did not work, and, frankly, the "site" variable in Sunrise is blank when I try to echo it to the screen, so something is really broken there.

Each blog has its own suite of tables of course:

1_posts

2_posts

3_posts

etc

Any suggestions?

Answers (7)

2012-05-12

Dan | gteh answers:

Run this query in phpmyadmin under the SQL tab. There are 2 spots you need to update in the wp_options table

UPDATE wp_options SET option_value = replace(option_value, 'http://old.site.url.com', 'http://new.site.url.com') WHERE option_name = 'home' OR option_name = 'siteurl';


then check your .htaccess file and make sure the rewritebase and rewrite rules match the new locations.

2012-05-13

idt answers:

Here are the tables you may need to check and change value to your new domain:
wp_options - site_url and home
wp_blogs - domain
wp_site - domain and path
wp_sitemeta - site_url
You also need to update each of the wp_*_options (e.g. wp_1_ , wp_2_, wp_3_) table and adjust the fields site_url and home

Then this:
UPDATE wp_posts SET guid = REPLACE (guid, 'http://oldsiteurl.com', 'http://newsiteurl.com');
UPDATE wp_posts SET post_content= REPLACE (post_content, 'http://oldsiteurl.com', 'http://newsiteurl.com');


Lawrence Krubner comments:

wp-blogs was important. Thanks for that.

2012-05-13

Francisco Javier Carazo Gil answers:

You should also change data that is serialized and you cannot change using UPDATE SQL. This tool you provide this functionality: [[LINK href="http://interconnectit.com/124/search-and-replace-for-wordpress-databases/"]]http://interconnectit.com/124/search-and-replace-for-wordpress-databases/[[/LINK]]

It's easy to install and use and it is really functional.


Lawrence Krubner comments:

Thanks for that. I would say the serialized data in the database is my least favorite aspect of WordPress.

2012-05-12

Roberto Mas answers:

Check you wp_config file and also the .htaccess file

2012-05-12

Gabriel Reguly answers:

Hi Lawrence,

Edit: Sorry, I was not thinking correctly. The sugestions below are for multisite with different domains, which is my default setup for multisite.

==================================================================

Surely you are using http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/, aren't you?

Also you have changed the configurations from sub folder to sub domains, right?

==================================================================



Doing the sql query that Dan | gteh suggested should fix your issue.



Regards,
Gabriel


Lawrence Krubner comments:

Which configurations to go from sub folder to sub domain?

2012-05-13

Arnav Joy answers:

can you provide me sql file for the database

2012-05-13

Jatin Soni answers:

You must have to change two option into the database
1. site_url
2. home

both you can find in 'wp_options' table

option_id is
0 and 37 respectively

Steps

Login to your phpmyadmin
Go to wordpress database
and now click on wp_options table in the left list
now you will see all row in that usually first row you will find with site_url click edit and change to new url
now may be on next page you will find home - (default option_id is 37) click edit and change the url to new url.

Now it should work