logo
Ask your WordPress questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$20
Multi site nightmare headache

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?

This question has been answered.

Lawrence Krubner | 05/12/12 at 5:04pm Edit


(7) Possible Answers Submitted...

See a chronological view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    05/12/12
    5:20pm
    Roberto Mas says:

    Check you wp_config file and also the .htaccess file

  • avatar
    Last edited:
    05/12/12
    5:23pm
    Dan | gteh says:

    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.

  • avatar
    Last edited:
    05/12/12
    5:35pm
    Gabriel Reguly says:

    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

    Previous versions of this answer: 05/12/12 at 5:35pm

    • 05/12/12 9:05pm

      Lawrence Krubner says:

      Which configurations to go from sub folder to sub domain?

  • avatar
    Last edited:
    05/13/12
    2:40am
    idt says:

    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');

    Previous versions of this answer: 05/13/12 at 2:40am

    • 05/13/12 2:18pm

      Lawrence Krubner says:

      wp-blogs was important. Thanks for that.

  • avatar
    Last edited:
    05/13/12
    12:53am
    Arnav Joy says:

    can you provide me sql file for the database

  • avatar
    Last edited:
    05/13/12
    7:21am
    Jatin Soni says:

    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

  • avatar
    Last edited:
    05/13/12
    8:15am
    Francisco Javier Carazo Gil says:

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

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

    • 05/13/12 2:19pm

      Lawrence Krubner says:

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

This question has expired.



Lawrence Krubner, Gabriel Reguly voted on this question.



Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.