Update database to support emoji - MyISAM to InnoDB


Staff member
If you are working with a database that already holds XenForo content, you will need to convert your tables before you can enable emoji support.

A script is provided with XenForo to perform this conversion for you, which needs to be run on a command line. If you have the ability to log in to your server via SSH or some other form of remote access, you can run the command yourself, otherwise you may need to ask your host to run the script for you - direct them to this document for instructions.

Running the conversion script​

Log in to your server using SSH, or open a command prompt over Remote Desktop if you are using a Windows server.

When you have a command line available, change your current working directory to your XenForo directory. You will know that you are in the correct directory, as it will contain a script called cmd.php.

You can now run the following command:

php cmd.php xf:convert-utf8mb4

The command may complete very quickly for a small database, or it may take quite some time for a database with lots of content. Be patient, and the script will complete eventually.

No damage will be done by running the script multiple times - if the script finds a database table that is already using UTF8mb4, it will not attempt to convert it again.

After running the script​

Once the script has finished its work, open your src/config.php file in a text editor and add the following line to the end of the file:

$config['fullUnicode'] = true;

Your forum will now fully support emoji in user generated content.

Source: https://xenforo.com/docs/xf2/unicode/

Similar threads