WordPress shows texts with ???? question marks

If your WordPress texts do not show utf-8 characters, that is, for example, letters with tildes, commas, “ñ” and other international characters, it may be because you have a problem in the definition of charset in the wp-config.php

I spent a couple of hours until I realized that I had erased a critically important line:

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

I deleted that line by accident because I was replacing some part of the wp-config.php with some logic to load a different configuration depending on the local or remote environment.

Advertisements