We ran across an interesting problem when we transferred a WordPress site from Dreamhost to Bluehost. We actually did a database export/import with phpMyAdmin instead of using the XML export tool built into WordPress.
When the database was transferred over to the new site, something had converted or rendered the apostrophe characters (‘) in the site to a weird character string: ’
So we had this seemingly weird string appearing on different posts and pages.
So how could you fix this? One way would be to give the aptly named “Search and Replace” plugin a whirl. It worked really well for our site considering it replaced over 400 character errors – which would have taken a really long time to fix manually.
Once the Search and Replace plugin is installed and activated, you’ll find it under the Tools menu. Select the database field where you want to perform the search and replace. Most of the time this would be “content.” Make sure to scroll to the bottom of the page to use the search + replace function.
Make sure you have a backup of your the original MySQL file just in case you need to restore it because there isn’t an undo function. Again, there is no undo so be careful using this plugin.
Here are five other common conversion errors that we also had to fix.
• = bullet point •
— = long dash/hyphen —
“ = start quote “
†= end quote ”
’ = apostrophe '
Get it: “Search and Replace” plugin
Side note: If you’re an advanced user and want to prevent this error from happening, here’s a solution at the MySQL level.