Solution to Fix the Character Encoding Mismatch Problem in WordPress

Date posted: 29/10/2019

Introduction

After switching my hosting account, therefore we might notice special / wired characters on our wordpress blog.

This error is due to we have some issue with Database Character Sets in wordpress. If you are facing similar problem, then here is solution for you.

Note:

If you are seeing some special characters as mentioned below in your wordpress blog post after moving or changing server, then that is the same issue I’m addressing in this blog article.

     â€™    â€œ     â€   â€¦     â€“     â€”    â€’    âˆš      â„¯x      Ï€      â„¯       Ã·    â€˜

Solution

Most importantly to fix this issue just comment those two line in wp-config.php file.

  1. After that open wp-config.php file and locate below coded lines

For your ref : /** Database Charset to use in creating database tables. */

define(‘DB_CHARSET’, ‘utf8’);
define(‘DB_COLLATE’, ”);

2. Similarly, comment bold lines and Save that file. To sum up commenting it should look like

//define('DB_CHARSET', 'utf8');
//define('DB_COLLATE', '');

It should have fixed that problem.

Alternate solution:

How we Fixed Special Character Problem using Search and Replace Plugin

Meanwhile solution to fix this character encoding problem in wordpress is, we need convert our MySQL database to utf8 or utf8_general_ci character set.

1. Firstly install search and replace plugin.

2. In addition install that plugin,

Certainly go to Tools >> Search & Replace

3. For instance Search in option, check all those option by clicking All option in that plugin

4. On the other hand Search for enter the wired character and in Replaced with enter the value which you need to replace.

click Go>> button to replace all the special character in wordpress with proper character

replacing wired character in wordpress

That’s it. Now your wordpress will no longer contains any character encoding problem or special characters.

Thanks for using pheonix solutions.

You find this tutorial helpful? Share with your friends to keep it alive.

Leave a Reply