deliciousbrains / wp-migrate-db

WordPress plugin that exports your database, does a find and replace on URLs and file paths, then allows you to save it to your computer.
https://wordpress.org/plugins/wp-migrate-db/
341 stars 515 forks source link

The Export migration failed during the migration initialization stage. #118

Closed Zellement closed 3 years ago

Zellement commented 3 years ago

Hey

I'm using WP Migrate DB Pro and trying to do an Export Database, but get the following error:

Unexpected token < in JSON at position 0

Any guidance on this?

Works fine when pushing/pulling between setups.

Running 2.0.2

Edit: This actually works on a production/staging server, but not my local setup. Do I need to enable a particular setting locally for this to work, does anyone know?

polevaultweb commented 3 years ago

Hey @Zellement, would you mind submitting a support request via the Help tab in the plugin? We don't provide assistance via GitHub

Zellement commented 3 years ago

Sure, although it seems to be behaving for now...

elias161 commented 3 years ago

Hola, yo estoy usando WP migrate DB versión gratuita y tengo un problema. En el momento que empieza a correr la migración, este se detiene en 1% y a continuación sale este error: The Export migration failed during the Table Migration stage.

y una imagen donde dice que la página no se encuentra.

he buscado la forma de solucionar pero no he conseguido, si alguien tiene una respuesta, quedaría agradecido.

Saludos

OnnoRoosenschoon commented 3 years ago

Hi there,

I have almost the same experience as Zellement with the free version.

I'm starting the migration process with help of a profile which worked many times befor until now. The error message I get is:

The Export migration failed during the migration initialization stage.

 Unexpected token W in JSON at position 1

I'd be happy to purchase the Pro version if I could be sure that it works in that version.

polevaultweb commented 3 years ago

Can you edit your wp-config.php file to replace this line -

define( 'WP_DEBUG', false );

With these lines -

define('WP_DEBUG', true); 
define('WP_DEBUG_LOG', true); 
define('WP_DEBUG_DISPLAY', false);

This means that any errors are logged to `/wp-content/debug.log', because some errors are not visible on screen.

More details about that at http://codex.wordpress.org/Editing_wp-config.php#Debug

Can you then retry the process and paste the debug.log file that should be created.

OnnoRoosenschoon commented 3 years ago

LS,

Thanks for your reply. I did what you asked for and this is the result:

[18-Aug-2021 09:44:49 UTC] PHP Warning: is_readable(): open_basedir restriction in effect. File(/temp-theme/theme.json) is not within the allowed path(s): (/sites/roosenschoon.info/www/:/sites/roosenschoon.info/www/:/sites/roosenschoon.info/subdomains/:/sites/roosenschoon.info/private/:/sites/roosenschoon.info/logs/:/sites/roosenschoon.info/backups/:/sites/roosenschoon.info/lib/php_include/cacert.pem:/sites/roosenschoon.info/tmp/:/tmp/) in /subdomains/knbv/wp-includes/class-wp-theme-json-resolver.php on line 354 [18-Aug-2021 09:44:49 UTC] PHP Warning: file_exists(): open_basedir restriction in effect. File(/temp-theme/functions.php) is not within the allowed path(s): (/sites/roosenschoon.info/www/:/sites/roosenschoon.info/www/:/sites/roosenschoon.info/subdomains/:/sites/roosenschoon.info/private/:/sites/roosenschoon.info/logs/:/sites/roosenschoon.info/backups/:/sites/roosenschoon.info/lib/php_include/cacert.pem:/sites/roosenschoon.info/tmp/:/tmp/) in /subdomains/knbv/wp-settings.php on line 545 [18-Aug-2021 09:44:49 UTC] PHP Notice: Undefined index: regex in /subdomains/knbv/wp-content/plugins/wp-migrate-db/class/Common/Replace.php on line 320 [18-Aug-2021 09:44:49 UTC] PHP Notice: Undefined index: case_sensitive in /subdomains/knbv/wp-content/plugins/wp-migrate-db/class/Common/Replace.php on line 324 [18-Aug-2021 09:44:49 UTC] PHP Notice: Undefined index: regex in /subdomains/knbv/wp-content/plugins/wp-migrate-db/class/Common/Replace.php on line 320 [18-Aug-2021 09:44:49 UTC] PHP Notice: Undefined index: case_sensitive in /subdomains/knbv/wp-content/plugins/wp-migrate-db/class/Common/Replace.php on line 324 [18-Aug-2021 09:44:49 UTC] PHP Notice: Undefined index: regex in /subdomains/knbv/wp-content/plugins/wp-migrate-db/class/Common/Replace.php on line 320 [18-Aug-2021 09:44:49 UTC] PHP Notice: Undefined index: case_sensitive in /subdomains/knbv/wp-content/plugins/wp-migrate-db/class/Common/Replace.php on line 324 [18-Aug-2021 09:44:49 UTC] PHP Notice: Undefined index: regex in /subdomains/knbv/wp-content/plugins/wp-migrate-db/class/Common/Replace.php on line 320 [18-Aug-2021 09:44:49 UTC] PHP Notice: Undefined index: case_sensitive in /subdomains/knbv/wp-content/plugins/wp-migrate-db/class/Common/Replace.php on line 324

I hope this gives a clue what is happening and what can be done about it.

mayurjobanputra commented 2 years ago

Can you edit your wp-config.php file to replace this line -

define( 'WP_DEBUG', false );

With these lines -

define('WP_DEBUG', true); 
define('WP_DEBUG_LOG', true); 
define('WP_DEBUG_DISPLAY', false);

This means that any errors are logged to `/wp-content/debug.log', because some errors are not visible on screen.

More details about that at http://codex.wordpress.org/Editing_wp-config.php#Debug

Can you then retry the process and paste the debug.log file that should be created.

These instructions were helpful. After looking at the log, I disabled a plugin that was showing up in the log. That seemed to fix the issue and the migration was successful. Though I have to say, I didn't see any entries in the log from the migrate db plugin. It would be helpful if your error message was more helpful.