What are the implications of changing a table’s character set?

Background: Since UpdraftPlus 1.13.8 (autumn 2017), UpdraftPlus has been able to do extra checks upon your database prior to restoration for compatibility. In particular, it will look at the MySQL server that WordPress is running on, and make sure that it supports the character sets which are used by your database backup. Of course, if you are restoring on the same site/server, then this won’t be an issue. But it can very occasionally be an issue when people create a site on one setup which is unusual, and then try to restore somewhere else. (The normal situation with modern MySQL and WP versions is that you’re using a character set which supports a full range of international characters).

In this case, UpdraftPlus will show you a warning, and ask if you want to change to a different character set, as below:

Changing character set

In the past, UpdraftPlus used to crash in this case. But now it will detect it, and give you this option, whether to carry on with an attempted substitution, or to abort.

So – is it safe?

The answer, unfortunately, is “sometimes”. If your database content includes characters which do not exist in your chosen character set, then the import will either fail, or MySQL will silently drop parts of the data. If your database content does not include characters which do not exist in your chosen character set, then the import will be successful. For this reason, you should choose a character set that is as similar as possible to the one that your are trying to replace, and to be ready for things to not work. It is difficult to give more advice than this, because the issue can become very technical.

The most fail-safe thing to do is to speak to the administrator of your destination server (i.e. the MySQL server), and ask him if he can enable the missing character sets on the server (which might mean upgrading MySQL). Then you will be able to be sure that there won’t be a problem.

Posted in: Restoration, Support