phpMyAdmin UTF-8 export/import

If you are trying to export WordPress database using phpMyAdmin in order to import it into a new WordPress installation then you have most probably run into the problem with garbled characters. This is most noticeable with content in non-english languages (German, French, Croatian…). Luckily we have quite simple fix, just follow these 3 steps.

  1. First export database in phpMyAdmin. Click ‘Custom” export method and change ‘Character set of the file’ to iso-8859-1 and adjust other settings if needed and click the button.
  2. Open exported file in your favorite code editor, we suggest Notepad++. Change encoding to UTF-8 without BOM and add the following line to the top of the file, like shown in image below:SET NAMES UTF8;

  3. Now change the file and import it  through phpMyAdmin on destination server. During the import select UTF-8 encoding.

That’s it, your database should me imported correctly.

Posted in Development Tagged with: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *


Spam protection (CAPTCHA) * Time limit is exhausted. Please reload CAPTCHA.