2

I'm trying to migrate a local build of my Wordpress website to a staging environment. I'm using 'wp migrate db' to do it. This involves uploading a database via phpmyadmin. When doing so I get an error saying:

1115 - Unknown character set: 'utf8mb4'

I have checked the below thread, but the guy just seemed to change his character set to utf8. I want to know how can I upgrade mysql to support utf8mb4? Or is that even the best solution? Ultimately I just want to migrate my local site to a staging environment on my subdomain. I tried doing this using the duplicator plugin, but also get a 'character set utf8mb4' error. So it seems this is the culprit.

I've investigated the below thread. The guy just changed his character set from utf8mb4 to utf8. I tried doing this too. I looked in my header.php and it is already using just a utf8 character set. But still get the same error. Not sure why.

ERROR 1115 (42000): Unknown character set: 'utf8mb4'

Is this solely a problem to do with utf8mb4 support on mysql? Or is there a way to migrate my site without encountering this issue?

Community
  • 1
  • 1
rjtkoh
  • 201
  • 3
  • 11
  • The staging and production environments must use the same versions, or else the testing environement becomes absolutely useless. Likewise, the development environment must also use the same versions, or else you will be writing code for the wrong target. – RandomSeed Jul 20 '15 at 11:27
  • Ok, so if i need to upgrade my mysql to support utf8mb4, is that something I personally need to do? Or is it something my hosting provider should do on their end? I contacted them by have not received a reply. – rjtkoh Jul 21 '15 at 12:01
  • Only you and/or your provider can answer this question, as we do not know the T&C's of the contract you have with them. Please note, my previous comment advises the most rigorous solution. Other people might know of cheaper/easier workarounds. – RandomSeed Jul 21 '15 at 12:33

1 Answers1

0

Edit the following files:

<install path>/libraries/DatabaseInterface.class.php
<install path>/libraries/mysql_charsets.lib.php

And change all instances of utf8mb4 to utf8.

r5d
  • 579
  • 5
  • 24