AIIMS Encoding Repair self-updates
One-click repair of garbled ("mojibake") characters in a WordPress/WooCommerce database after a bad-charset import. Dry-run preview, serialization-safe, stateless. Built-in GitHub auto-updates.
by AIIMS · github.com/aiimsrobin/aiims-encoding-repair · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/aiimsrobin/aiims-encoding-repair/releases/download/v1.0.1/aiims-encoding-repair-1.0.1.zipShips its own WordPress updater (built-in updater), so new versions show up under Dashboard → Updates.
Readme
AIIMS Encoding Repair
One-click repair of garbled ("mojibake") characters in a WordPress / WooCommerce
database — the â€", ’, é-style corruption left behind when a site is imported
or migrated with the wrong character set.
Preview every change with Dry Run, then Apply. It only rewrites cells that actually contain the tell-tale bytes, and it is serialization-safe, so ACF fields, theme options and page-builder data stay valid.
Stores no settings, adds no front-end hooks, makes no external calls during a repair. Deactivating or deleting the plugin leaves no trace — the corrected text simply stays corrected.
What it fixes
Smart quotes and dashes (' ' " " – —), ellipsis …, bullet •,
trademark ™, euro €, copyright ©, registered ®, degree °, non-breaking
spaces, and accented Latin letters (é è ê ë à â ä ç ñ ö ô ü û á í ó ú).
It scans the core content tables — posts (title, content, excerpt), postmeta, options, comments, terms, term taxonomy and term meta — which covers WooCommerce product titles and descriptions, ACF fields and most page-builder content.
Usage
Tools → AIIMS Encoding Repair → Dry run (preview) to see what would change, then Apply fix. A built-in self-test on the page shows before/after samples so you can confirm the fixer works before touching your data.
Back up the database before applying. Always run Dry Run first.
WP-CLI is also supported:
wp aiims-encoding dry # preview, writes nothing
wp aiims-encoding fix # apply
How it works (safety)
- Admin-only — every action requires
manage_optionsand a valid nonce. - Targeted — only rows containing the corruption bytes (
Ã/Â/â) are read; clean text is never touched. - Serialization-safe — serialized values are unserialized, repaired, then re-serialized so structured data (ACF, options, builders) stays valid.
- Single-pass — a longest-match
strtr()pass, so replacements never cascade. - Stateless — no options stored, no cron, no front-end hooks. Removing the plugin removes it completely.
Fix the root cause too
This plugin repairs existing garble; to stop it recurring on a server, fix the import
charset: set define('DB_CHARSET', 'utf8mb4'); and define('DB_COLLATE', ''); in
wp-config.php, ensure the database and tables are utf8mb4 (not latin1), and always
migrate with UTF-8 on both ends (mysqldump --default-character-set=utf8mb4 …, and in
phpMyAdmin set the import "Character set of the file" to utf8mb4).
Requirements
- WordPress 5.0+
- PHP 7.0+
Installation
Plugins → Add New → Upload Plugin → choose aiims-encoding-repair.zip → Activate.
Auto-updates
Auto-updates are built in — no external library or extra plugin required. The plugin checks this repository's latest GitHub Release (cached for 6 hours) and, when a higher version is published, shows the update in Dashboard → Updates. One click installs it.
To ship an update: bump the Version: header, publish a new GitHub Release with a
higher tag, and attach the built plugin zip as a release asset.
Repository: https://github.com/AiimsRobin/aiims-encoding-repair
Changelog
- 1.0.1 — Renamed to AIIMS Encoding Repair; built-in GitHub self-updater (no external library required).
- 1.0.0 — Initial release (as Mojibake Repair).
License
GPL-2.0-or-later.
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| v1.0.1 | Jul 28, 2026 | aiims-encoding-repair-1.0.1.zip | 1 |