WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: WP Migrate DB] Messed up characters post migration

[Resolved] [Plugin: WP Migrate DB] Messed up characters post migration

  • Great plugin but I’ve experienced issues with characters being messed up on several migrations I’ve done.

    Examples (before/after) :

    strength and versatility
     strength and versatilityÂ

    S’s
    S’s

    offer – now!
    offer – now!

    ^^ Looking at these in raw HTML edit mode
    sql dumps pre and post available if you would like to examine them

    Otherwise its a great plugin and thanks

    http://wordpress.org/extend/plugins/wp-migrate-db/

Viewing 6 replies - 1 through 6 (of 6 total)
  • so this plugin is presumably not UTF-8 compatible? this would be very problematic…

    I may need to do some tests to verify if this is maybe related to different collation on the DB itself :/ <throws hands up in air>

    drat, i’m running into character encoding issues too, otherwise great plugin.

    Yes I “think” the trick is to always ensure that your new wordpress databases always have the same character set/collation:

    CREATE DATABASE mydb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;

    Its still a mystery to me why the official wordpress installation docs exclude this. Maybe I’m wrong :/

    ericson, if you’re still in a spot of trouple try this route:
    http://wordpress.org/extend/plugins/utf-8-db-converter/
    followed by creating the the new DB in utf etc:
    http://www.rhyous.com/2009/11/05/how-to-create-a-utf-8-unicode-database-on-mysql/

    -good luck

    What ever the issue with this plugin is I’ve just had to give up on it.
    I had to do an emergency migration and its totally fudged all the posts up again, I’ve at least had success the old fasioned way:

    mysqldump origdb > wp_orig.sql
    cp wp_orig.sql wp_new.sql
    perl -pi -e "s+old.domain.com+new.domain.com+g" wp_new.sql
    perl -pi -e "s+/public/sites/oldpath+/public/sites/newpath+g" wp_new.sql
    # assuming the destination DB and grants are ready just drop it and re_create it with the new variables
    mysql -e "drop database newdb;"
    mysql -e "CREATE DATABASE newdb DEFAULT CHARACTER SET utf8;"
    mysql -uliveusername -plivepassword newdb <~/wp_new.sql

    NB: the perl does a search/replace on a file..
    I also use it on all files containing matches.. so hard-coded .xml files for some plugins for example sometimes need this.

    To find a list of files that need changing:
    find /path/to/search -type f -exec grep -l <string> {} \;

    Plugin Author Brad Touesnard

    @bradt

    If you import the database using the mysql command, you should also set the –default-character-set=utf8 setting as well.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] [Plugin: WP Migrate DB] Messed up characters post migration’ is closed to new replies.