Puddinq.com sharing knowledge

Fix WordPress migrate PhpMyAdmin errors and others

Fix WordPress migrate PhpMyAdmin errors and others

When migrating from development to live it is very simple to just synchronise the upload folder and export and import the database with PhpMyAdmin. In some cases this resolves in errors, and if this is the only technique you know you can get blocked. There are a few other migrating options and one special one the will work in 99% of the cases. Below they are in their own parapraph.

PhpMyAdmin error

If you migrate your database with PhpMyAdmin you add a more variables to the process then you might realize. Differences in he database version, or type (MySql or MariaDb) is not that big of a problem, but different versions of PhpMyadmin can cause bigger problems. PhpMyAdmin is running on php and different versions of php can have an impact ass well. First thing you can try is to export the database in a lower compatibility mode.

  • Click export
  • Select: Custom – display all possible options
  • Under: Format-specific options:
  • Select MYSQL40 at Database system or older MySQL server to maximize output compatibility with:

You might also:

  • Make sure the php versions are the same
  • Ans PhpMyAdmin versions are the same

WP db Migrate

There are a few unofficial versions of Wp db migrate pro available, maybe the most expensive plugin around, but fairly the best appreciated aswell. The unofficial versions just do not work with php 7 at the ‘setting’ side anymore. I’ve noticed that if I push from development to live the live side can have php 7 but the development needs to be running php 5.6. The orther way around, if you are pulling from development to live, development can be on php 7 but the live side needs to run php 5.6.

Interconnect

Interconnect database rename tool, is a free opensource, brilliant peace of software aswell. Just like wp db migrate it can give ajax errors while renaming database values. If you are running into this there is a good change you are running it on php 7+. Try to run (just while renaming) the renametool in php 5.6. As php 5.6 is dissapearing from hosting enviroments you might only be able to run the tool local. It is easy to have an local setup with everything you need if you install WAMP and select your desired packages

Best export import

For the method that works in 99% of the situations: (you need commandline acces)

  1. Run mysqldump to export: mysqldump -u [user] -p[password] -h localhost [database] > database.sql
  2. Run mysql import: mysql -u [user] -p[password] -h localhost [database] < database.sql
  3. If you get errors, try the –force option: mysql -u [user] -p[password] -h localhost –force [database] < database.sql