If your previous hosting server used a legacy character encoding rather than modern UTF-8, special characters, accented letters, and Scandinavian characters (ä, ö, å) may display incorrectly after migrating your site. Common legacy encodings include ISO-8859-1, ISO-8859-15 (Latin-9), and Windows-1252 on older Windows servers.
At Seravo, all systems, file storage, and databases strictly use modern UTF-8 and utf8mb4 encodings.
Character encoding issues typically appear in three distinct places:
In site content and post text coming from the database (e.g., displaying
ä,ö, or ``).In uploaded media and image file names (images with special characters fail to load or return 404 errors).
Directly inside theme or plugin source code files (
.phpfiles).
1. Broken Characters in Site Content (Database)
This is the most common encoding issue encountered during site migrations. It usually stems from how the database was originally created on the old server or how WordPress interprets the stored data against its current configuration.
A. Checking wp-config.php (Fastest Solution)
Seravo's default configuration in /data/wordpress/htdocs/wp-config.php checks for environment variables and defaults to modern utf8mb4 encoding with utf8mb4_swedish_ci collation:
define('DB_CHARSET', getenv('DB_CHARSET') ? getenv('DB_CHARSET') : 'utf8mb4');
define('DB_COLLATE', getenv('DB_COLLATE') ? getenv('DB_COLLATE') : 'utf8mb4_swedish_ci');If your old database was originally created with an older encoding and imported into Seravo as-is, WordPress may misinterpret those characters. You can test a fix by adjusting these lines directly in your wp-config.php file:
Test 1: Legacy 3-byte UTF-8
If the old database used MySQL's older 3-byte UTF-8 implementation:
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
Test 2: Clearing the Character Set Definition (Latin1 / ISO-8859)
If the previous host stored characters in Latin1 / ISO-8859, clearing both definitions instructs WordPress to let MariaDB handle the raw byte output directly:
define('DB_CHARSET', '');
define('DB_COLLATE', '');Remember to purge the cache:
Whenever you modify wp-config.php, flush the site cache from the command line using wp-purge-cache so your changes take effect immediately in the browser.
2. Broken Characters in File Names (Uploads Folder)
If images or attachments uploaded on your old host contained non-ASCII or Scandinavian characters encoded in a legacy format, Seravo’s UTF-8 filesystem might not match them to database references, causing 404 Not Found errors when loading images.
You can convert file names to UTF-8 on the server using the convmv utility.
Dry Run (Testing without applying changes)
Navigate to your media uploads directory and run a test conversion:
cd /data/wordpress/htdocs/wp-content/uploads/
convmv -f ISO-8859-15 -t UTF-8 -r .
(If the files originated from an older Windows-based host, try -f windows-1252 instead).
This dry-run command outputs a list previewing which file names would be converted, without altering any files on disk.
Performing the Actual Conversion
Once you have verified from the test output that the conversion correctly repairs the filenames:
convmv -f ISO-8859-15 -t UTF-8 -r . --notest
3. Broken Characters inside Theme or Plugin Files (.php, .css)
If text strings containing special characters are hardcoded directly into source files (such as a theme's functions.php or .po translation files) using a legacy character set, you can convert the file contents using iconv.
Check the current file encoding:
file -i file.php
Convert the file to UTF-8:
iconv -f ISO-8859-15 -t UTF-8 file.php -o file_new.php
mv file_new.php file.php
See Also
Diagnosing character set issues can occasionally require careful investigation, particularly if data has undergone double UTF-8 encoding (mojibake). If you are unable to resolve character display issues on your own, Seravo's WordPress specialists are always available to help at [email protected].
