The MU forums have moved to WordPress.org

Switching main domain (7 posts)

  1. petrivilen
    Member
    Posted 16 years ago #

    Hello everyone,

    I've been working on a WPMU project and we're replacing our old site with the new one. This involves also switching the main domain from kyweb.org to kyweb.fi. The URL is in quite a lot of places - three or four times in blog options and guids. Do you have any suggestions how to manage with the transfer?

  2. andrea_r
    Moderator
    Posted 16 years ago #

    Search and replace on the db? :)

  3. cclinton
    Member
    Posted 16 years ago #

    I am about to do the same, a change from .net to .com. Can we just go to the Admin>Edit for the main blog and make the changes in the home and file upload area? Will this be enough to make the change or do we really have to get into the database and make changes?

  4. andrea_r
    Moderator
    Posted 16 years ago #

    You really have to go into the database. If you just edit the main blog fields under admin, it will change only for that blog, not all of them.

    Having done this, I can tell you it's just easier, faster and more accurate to do it right in the db itself.

  5. mzeecedric
    Member
    Posted 16 years ago #

    Hi andrea, is there any way to do that globally? The only syntax i know about is:

    update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');

    Its quite some tables. Or is it better to search & replace within the SQL-Dumpfile?

  6. andrea_r
    Moderator
    Posted 16 years ago #

    "Or is it better to search & replace within the SQL-Dumpfile? "

    yes.

  7. mzeecedric
    Member
    Posted 16 years ago #

    Thanx andrea, worked fine.
    sed -i 's/domain1/domain2/g' dumpfile
    is your friend.

About this Topic

  • Started 16 years ago by petrivilen
  • Latest reply from mzeecedric