Some functions for wordpress to correct wrong encoding while migrating a website.
decode-batch-attachments.php | ||
decode-batch-posts.php | ||
decode-check.php | ||
decode-fields.php | ||
decode-init.php | ||
decode-remove.php | ||
LICENSE | ||
README.md |
Decode Wp Database
Some functions for wordpress to correct wrong encoding while migrating a website.
Require ACF field plugins
Very manual process, initially I was just uploading and removing files from the mu-plugin folder to go from one step to another. Then I added some $_GET request to launch process with manual url modifications
Used method to clean encoding of all the database after migration
- copy the database to the news server
- in PhpMyAdmin : Operation -> Interclassement : select utf8mb4_unicode_520_ci, Edit for all tables and all columns of all tables
- upload the 3 decode-*.php plugins into the mu-plugin folder
- go to admin panel and add to the url ?decode-init, refresh
- adjust decode-batch-posts.php with correct option : dry = true to start, with...
- then go to url yourwpsite.com/?decode-post, and refresh to pass all files
- then repeat for the attachment !