TYPO3 Database: Change character set and collation to utf-8

TYPO3 often gives us a warning about the incorrect collation of the mysql database.

We use this on the entire database to set the collation. Please note that we only do this before importing a new database. We never use this on a current running database. Please make sure you have all necessary backups before attempting something like this.

ALTER DATABASE yourname CHARACTER SET utf8 COLLATE utf8_unicode_ci;

After this we will set the character set to UTF8 also. This prevents problems with special characters like é, ë, ü and a lot more.

SET NAMES UTF8;
SET CHARACTER SET UTF8;

Sometimes if we forget to do this the pages show strange character after the database import while moving a TYPO3 website to another server.

Created by Daniel on 11/22/2024

Copyright © DanielKnows.com 2019 - 2024 - Built with NuxtJS

Subscribe for Tech Tips!

Stay updated with the latest tech insights and tips. Subscribe now!

{}