Well, my blog was windows-1251. Terrible, isn’t it? Almost everyday I talk around that every project on the web should be unicode, but my own blog was not UTF-8 encoded. The problem was the collected cp-1251 content.

Today the conversion has been done. The procedure is very simple:

  1. Backup your current database
    mysqldump --opt -u user --password="pass" dbname > wpdb.sql
  2. Convert your dump file with iconv
    iconv -f WINDOWS-1251 -t UTF-8 wpdb.sql > wp-conv.sql
  3. Drop your current database and re-create it again. Leave it empty.
  4. Import converted dump file into new database.
    mysql -p dbname < wp-conv.sql
  5. Set your WordPress (Options – Reading – Encoding) to use UTF-8 enconding
  6. Enjoy

Накратко за Йовко Ламбрев

ИТ и Интернет експерт, предприемач, блогър и фотограф от Пловдив. Фен на WordPress, книгите и музиката. Вярва, че можем да направим света по-добър.

  1. Congratulations Yovko! Very good HOWTO! I'll try it these days.

    Отговор

Вашият коментар

Вашият имейл адрес няма да бъде публикуван. Задължителните полета са отбелязани с *