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 ( )
- the WordPress blog offline s - - maintenance .
- , is . ’ s cPanel , ’ s , s the s SQL , dump.
- the convert_to_utf8_sql_generator.txt script s PHP .
- the script input the WordPress blog is s. the text:
Tables_in_DATABASENAME
The DATABASENAME is the you WordPress . this , ,
Tables_in_wp_mydigitallife
- the convert_to_utf8_sql_generator.php ( s rename s convert.php) WordPress , wp-config.php is s .
- , 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 .
- 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
- Login Telnet SSH. s skip this s Unix you phpMyAdmin the , . So you , done.
- MySQL .
- the MySQL :
DATABASENAME;
, DATABASENAME WordPress .
- the SQL script, into the MySQL . SQL MySQL s . s the s s.
- , 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 .
- 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 .
- the indexes / FULLTEXT indexes been , .
- the blog into .
- blog is .
- the PHP script.
contribute My s .
Related
- WordPress Charset 2.2
- s ( ) MySQL
- WordPress 2.2
- IMP-00016 Error Oracle
- Oracle EXP-00091 Error
- WordPress 2.3 1 (RC1) Tags
- s , WordPress Error
- Tracking WordPress 2.6
- s WordPress /
- WordPress MySQL SQL Error WPDB

































s 23rd, 2007 0427:
…
( 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.
July 11th, 2007 16:00
[...] MySQL 本身的問題,便一知半解地去亂 set,結果一樣。。。 (5:00) 直至我讀完這篇文章,發現是 WP 由 2.1 升至 2.2.1 之後,閱讀 db 的 script 真的變了,讀不了 SQL db [...]
July 21st, 2007 15:33
[...] 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 [...]
September 4th, 2007 18:57
[...] 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 [...]
September 16th, 2007 02:04
Why don’t you just link the file directly here?
It is pain to register just to download the file.
September 16th, 2007 03:15
[...] 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 [...]
September 16th, 2007 03:59
Hi Chris, sorry for inconveniences, it’s so that users can discuss any bugs on the script on the forum when needed.
September 29th, 2007 03:23
[...] 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 [...]
November 17th, 2007 07:55
[...] ponga, siempre hay algo que me va a salir desconfigurado: los posts o los comentarios. He probado
November 19th, 2007 03:35
[...] 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 [...]
December 14th, 2007 03:05
Hi, it worked fine for me using MyPHPAdmin.
Thanks for the article.
February 27th, 2008 01:20
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!
March 2nd, 2008 01:52
[...] How to convert character set and collation of wordpress database? [...]
March 19th, 2008 03:32
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!
March 31st, 2008 13:09
[...] How to Convert Character Set and Collation of WordPress Database Guide to Convert WordPress Database Character Set to UTF8 (Unicode) — » My Digital Life [...]
June 19th, 2008 12:19
[...] 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. [...]
July 24th, 2008 18:53
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.