Support » Fixing WordPress » backup database gives stranges characters

  • Yesterday I tried to upgrade a friends wordpress after succesfully upgraded my own. Instead of seeing the page that is was all a piece of cake something went wrong. Loking at the database in phpmyadmin told me that the tables couldn’t be repaired. No problem I thought, just restore the backup. That was no help and now I have made a new, fresh install of wp 2.0.9. cut the database sql file into little pieces en restored the database. WordPress is working again but….. in Holland we have this accents on letters, like á en é, and also the quotesignes. They are all replaced by other characters and combination of characters. I know now (after a lot of reading and googling) that his has something to do with the charset. In the table it is said that it is set on latin_1_ci, but in the header of the page its utf8.
    I’ve tried to change, but I think the problem now is the restore of the database. That exporting went wrong. So I want to replace all this funny characters with the proper html-code. If that is possible. I was thinking of a query in phpmyadmin, but don’t know much about that and looking on the internet didn’t bring me de right string.
    How can I change this characters by a sort of search and replace order?
    Of is there a better way to solve this problem

Viewing 1 replies (of 1 total)
  • afdenahy


    I have just upgraded my WordPress site from 2.04 to 2.2.1 using Fantastico. After the upgrade, many posts had the strange characters.
    eg. n“We shape our dwellings, then afterwards our dwellings shape our lives…”,

    should be:“We shape our dwellings, then afterwards our dwellings shape our lives…”

    This problem is I think caused by people cutting and pasting from Word documents. So, we can prevent future problems by not doing this, but how do we fix a website full of these characters?

    This is what I did, step by step:

    1. I located my database backup which I had produced using the WordPress Database Backup plugin ver. 1.7. This backup file was a text file containing a lot of sql and data. I opened the file in Notepad++ (, changed the Format from Encode in ANSI to UFT-8, then saved. Make sure you see that the weird characters change to nice ones when you change the format.

    2. I used the Import button in phpMyAdmin (cPanel:mySQL Databases). This button is near the bottom of the entry screen in phpMyAdmin.

    3. I browsed to my backup file on my computer, and accepted the default settings, including UTF8. Then Go.

    4. I then browsed to my site, Mount Alexander Sustainability Group. What a shock! All the posts had disappeared, and there was an error message. My heart sank – what had I done! Did this mean that the backup file was useless? I checked the database via cPanel – it looked OK. I then entered Site Admin on my website, and thank goodness there was a message that said that WordPress was out of date and had to be updated. Clicked on the provided link and suddenly all was right – website intact, and no strange characters anywhere!!

Viewing 1 replies (of 1 total)
  • The topic ‘backup database gives stranges characters’ is closed to new replies.