For anyone needing a workaround, you can run this php script on your existing installation before migration (posted on stackoverflow.com by hkasera):
<?php
$con = mysql_connect('localhost','user','password');
if(!$con) { echo "Cannot connect to the database ";die();}
mysql_select_db('dbname');
$result=mysql_query('show tables');
while($tables = mysql_fetch_array($result)) {
foreach ($tables as $key => $value) {
mysql_query("ALTER TABLE $value CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci");
}}
echo "The collation of your database has been successfully changed!";
?>
Amazing thanks so much for this mate, helped me big time 🙂
Thanks Trevellyan!
I’ll see if I can integrate that as an option in the installer…
Cheers~
That would be excellent, thanks!
I can confirm resolved, from my point of view. After migration I tested plugin upgrades, page creations & removals. Even as of WP 4.2 it doesn’t care that the server doesn’t support utf8mb4_unicode_ci, even if it was installed on a server that supported it (I guess it fails back to utf8_unicode_ci).
Thanks very much to Cory & Trevellyan, and I agree it would be vital for this to be the installer, even as an “advanced” option, since so many people will have to move development sites into production on brain-dead hosting.
In which version? I don’t see a release more recent than my report.
This has not been applied to any Duplicator versions as of 0.5.18.
@trevellyan you are genius thanks for the script…..really saved my life
You’re welcome, I copied it from hkasera’s answer to “How to change collation of database, table, column?” on stackoverflow.com.
Beginner question: When you say “Run this script on your existing installation” do you mean go into phpMyadmin and run a query on the database? If not, where do you run the script from?
Thanks!!
I’m trying to deal with this issue now, and have a newbie question:
When you say “Edit the script to replace the placeholders with information specific to your server.” exactly what does that mean? Which text items in the script are placeholders? Can you please point them out for me and the other newbies?
Again, sorry for the newbie question and HOPEFULLY Duplicator will be updated soon so that this manual intervention with database issues is just a distant nightmare.
In this line:
$con = mysql_connect('localhost','user','password');
‘localhost’, ‘user’ and ‘password’ are placeholders. You need to replace them with the correct hostname, user name and password for your MySQL server.
In this line:
mysql_select_db('dbname');
‘dbname’ is a placeholder. You need to replace it with the name of the database that you want to modify.
All the values you need can be found in your wp-config.php.
I’ve used code above on dev env, and then migrate to production env without errors. Everything works, but all text and symbols was replaced to �����. See https://yadi.sk/i/xmQCNpRzmfr8K
UPD: original text was in russian