s Collation WordPress

WordPress 2.2, WordPress the user the WordPress collation DB_CHARSET DB_COLLATE wp-config.php . , WordPress the (charset) collation (i.e. , , s ) s .

, WordPress WordPress s UTF-8 charset collation, the is ( MySQL ) latin1_swedish_ci collation. you s s blog WordPress, s blog , you the re- the dump . The symptom is , WordPress , weird , s lots ????? ( ), rendering the WordPress useless unreadable. ( s s charset collation)

The WordPress is the charset collation UTF-8 . , you MySQL phpMyAdmin scripts . WordPress s, sets s the the MySQL . the sets, TEXT ( ) UTF-8, TEXT the the , WordPress s , s , s s !

The s s s s s WordPress MySQL s another, UTF-8. , the s , the . , the involved TEXT related WP BLOB, the the BLOB TEXT. , so so ? , s the .

andersapt s script convert_to_utf8_sql_generator.txt automatically s SQL WordPress UTF8 s. , seems s script, the s claimed , my , wont’ the SQL the error “PHP error: s get_results() s - convert.php 37″. , this script s the , utf8_general_ci collation.

UTF-8 s , ’ s . seemed the s s.

s WordPress UTF8 ( )

  1. the WordPress blog offline s - - maintenance .
  2. , is . ’ s cPanel , ’ s , s the s SQL , dump.
  3. the convert_to_utf8_sql_generator.txt script s PHP .
  4. the script input the WordPress blog is s. the text:

    Tables_in_DATABASENAME

    The DATABASENAME is the you WordPress . this , ,

    Tables_in_wp_mydigitallife

  5. the convert_to_utf8_sql_generator.php ( s rename s convert.php) WordPress , wp-config.php is s .
  6. , the script web . this, convert_to_utf8_sql_generator.php ( you script) s blog URL (i.e http:/www.mywebsite.com/convert_to_utf8_sql_generator.php) . s SQL web .
  7. post_content s wp_posts DOES indexes FULLTEXT indexes. Else the BLOB s errors . , related indexes . , the indexes.

    ERROR 1170 (42000): BLOB/TEXT ‘post_content’ s s

    ERROR 1283 (HY000): ‘post_content’ FULLTEXT index

  8. Login Telnet SSH. s skip this s Unix you phpMyAdmin the , . So you , done.
  9. MySQL .
  10. the MySQL :

    DATABASENAME;

    , DATABASENAME WordPress .

  11. the SQL script, into the MySQL . SQL MySQL s . s the s s.
  12. , the error related . my , the BLOB :

    wp_categories.category_nicename
    wp_comments.comment_approved
    wp_links.link_visible
    wp_options.option_name
    wp_postmeta.meta_key
    wp_posts.post_status
    wp_posts.post_name
    wp_posts.post_type
    wp_usermeta.meta_key
    wp_users.user_login

    -ASCII . category_nicename ( ) post_name ( ) been URL ( URL -alphanumeric s s (%) hex plus (+) ). codes UTF-8 is ASCII, so UTF8 .

  13. the wp-config.php DB_CHARSET DB_COLLATE . the , preferably the MySQL :

    defineDB_CHARSET(’’, ‘utf8′);
    defineDB_COLLATE(’’, ”);

    WordPress Codex, DB_COLLATE is (null) so the collation automatically MySQL .

  14. the indexes / FULLTEXT indexes been , .
  15. the blog into .
  16. blog is .
  17. the PHP script.

: is " is" s . understand. .

contribute My s .



17 “ s Collation WordPress ”

  1. g30rg3_x
    s 23rd, 2007 0427:
    1


    ( my ) m directly the database character set, please review my plugin and you will see that first it will convert your database binary and them to utf8 and finally it will put everything like before encoding but obviously with the UTF-8 character set…

    I prefer to do and a..
    ALTER TABLE table_name CONVERT TO CHARACTER SET binary
    Than just make a mysql sentence for every text/string field, because as you can see the problems comes with key and some index value and the BLOB field type change.
    Converting truth the sentence that my plugin use will transform all char to binary, all varchar to varbinary, all text (tynitext, text, mediumtext, longtext) to his binary representations (tinyblob, blob, mediumblob, longblob) and finally just set enum and set types with the collation binary.

    I just came here to say this in favor and by the way the majority of the problems of my plugins are related to host configurations and other things that obviously i can control.

    BTW its a better to solution to avoid problems of key and index by just setting the correct binary representation rather than using blob in all the way.

    Greetings from mexico and sorry for all mistyping problems.

  2. fotizo φωτίζω » Blog Archive » Wordpress 2.1 > 2.2.1
    July 11th, 2007 16:00
    2

    [...] MySQL 本身的問題,便一知半解地去亂 set,結果一樣。。。 (5:00) 直至我讀完這篇文章,發現是 WP 由 2.1 升至 2.2.1 之後,閱讀 db 的 script 真的變了,讀不了 SQL db [...]

  3. How to Backup and Restore (Export and Import) MySQL Databases Tutorial » My Digital Life
    July 21st, 2007 15:33
    3

    [...] If this case, use –default-character-set=charset_name option to specify the character set or convert the database to UTF8. Get help or contribute tips or tricks at My Digital Life [...]

  4. Wordpress 2.2 UTF Konvertierung | Blog[CHA] v2
    September 4th, 2007 18:57
    4

    [...] die Schnauze. Mit etwas mehr Hartnäckigkeit bei der Suche konnte ich am Ende dann doch noch eine passende Konvertierungsanleitung finden, die auf mystische Art und Weise sowohl auf das fehlerhafte Plugin hinweist, als auch die [...]

  5. Chris
    September 16th, 2007 02:04
    5

    Why don’t you just link the file directly here?

    It is pain to register just to download the file.

  6. curo.dk » Blog Archive » Wordpress charset problem and solution
    September 16th, 2007 03:15
    6

    [...] to convert my database to UTF8 so my blog doesn’t look funny. The plugin didn’t work, another site requires registration (how lame), so I came up with my own solution which is KISS all the [...]

  7. admin
    September 16th, 2007 03:59
    7

    Hi Chris, sorry for inconveniences, it’s so that users can discuss any bugs on the script on the forum when needed.

  8. Isotipo
    September 29th, 2007 03:23
    8

    [...] la codificación de acentos, ñ y símbolos para que funcionara bien. Para problemas recomiendo este artículo que indica los pasos para convertir tu bbdd a codificación [...]

  9. Octaedro » Una soluci
    November 17th, 2007 07:55
    9

    [...] ponga, siempre hay algo que me va a salir desconfigurado: los posts o los comentarios. He probado

  10. Back on track! | isa costa * the geek side
    November 19th, 2007 03:35
    10

    [...] ficheiro wp-config.php e deixar os valores das constantes DB_CHARSET e DB_COLLATE em branco. Outra solução é converter a base de dados toda para UTF-8, o que para mim já soa a [...]

  11. Sergio Nascimento
    December 14th, 2007 03:05
    11

    Hi, it worked fine for me using MyPHPAdmin.

    Thanks for the article.

  12. Media Addicted
    February 27th, 2008 01:20
    12

    I’m using PHPmyAdmin and try to convert my database to utf-8, but…PHPmA interrupts the process with the first error message (concering key length as mentioned in ur guide).

    Is there a way to make PHPmA ignore errors to proceed the other tables?

    Thx in advance!

  13. If I have absolutely nothing to say : 2008030101
    March 2nd, 2008 01:52
    13

    [...] How to convert character set and collation of wordpress database?  [...]

  14. Larry Hirscg
    March 19th, 2008 03:32
    14

    I must applaud you for publishing this. After hours of searching for an easy solution, when my provider moved my database to an “upgraded” platform, I was able to follow your instructions and and get the character set changed. I used the phpmyadmin to execute the code and deleted the lines that had errors. It ran perfectly and I only needed to edit a few slugs that had odd character in them. Fabulous!

  15. Links for 2008-03-30 [del.icio.us] » Festival BD-Comminges
    March 31st, 2008 13:09
    15

    [...] How to Convert Character Set and Collation of WordPress Database Guide to Convert WordPress Database Character Set to UTF8 (Unicode) — » My Digital Life [...]

  16. … @ a distance … » UTF-8
    June 19th, 2008 12:19
    16

    [...] with troubleshooting the issue of not able to use the 2 lines in the wp-config.php file. Tried this method, but it didn’t work. Then I read up the idea of converting the SQL in a text editor. [...]

  17. something2
    July 24th, 2008 18:53
    17

    I’ve uploaded an extended script to the thread. It handles cases where the tables and columns are utf8 but the strings inside are latin1. This happens when the tables are created as utf8 but the wp-config.php is missing DB_CHARSET and DB_COLLATE variables.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting


Custom Search

New Articles

Incoming Search Terms for the Article

phpmyadmin change Collation - MySQL convert collation - mysql convert character set - convert collation - mysql convert encoding - mysql convert charset - oracle COLLATE - convert charset - php convert characters - mysql convert - change collation phpmyadmin - phpmyadmin character set - wordpress collation - phpmyadmin change table collation - wordpress charset - wordpress latin1_swedish_ci - mysql convert utf8 - oracle convert character set - phpmyadmin change encoding - oracle convert - mysql convert database encoding - collation convert - mysql convert table encoding - convert collation mysql - php convert character set - mysql convert character encoding - oracle character set - phpmyadmin collation - phpmyadmin change database collation - convert latin1_swedish_ci to utf8 - convert mysql collation - mysql convert character - convert collate - mysql convert database charset - php convert charset - latin1_swedish_ci wordpress - php convert character encoding - characterset - sql convert charset - mysql convert char - wordpress database encoding - sql php convert chinese - mysql charset converter - how to convert Object of class wpdb to string in php - funny characters phpmyadmin - latin1_swedish_ci wordpress database - mysql convert database character set - mysql collation conversion - mysql convert characters - change collation mysql - mysql CONVERT TO CHARACTER SET - convert character set - mysql change collation for all tables - php convert text encoding - php convert latin1 to utf8 - convert table collation mysql - convert_to_utf8_sql_generator.txt - collation change - wordpress charset problem with bulgarian - wordpress database convert - wordpress database collation - convert character encoding - php convert latin1 - wordpress change collation - CONVERT DATABASE TO UTF8 - MySQL convert to unicode - auto convert latin1 to utf-8 mysql php function - wordpress database name - convert mysql charset - mysql change collation - mysql "cannot be part of FULLTEXT index" - wordpress character sets - mysql change database encoding - oracle collation - latin1_swedish_ci to utf8 -