• Resolved anibalardid

    (@jackalpret)


    Hi, I’m trying to migrate one site through php script that runs:
    exec(“cd ${directory} && /usr/local/bin/wp migrator start $token –email=$email –debug –allow-root”);

    I attached console output:

    Debug (bootstrap): Fallback autoloader paths: phar://wp-cli.phar/vendor/autoload.php (0.013s)
    Debug (bootstrap): Loading detected autoloader: phar://wp-cli.phar/vendor/autoload.php (0.014s)
    Debug (commands): Adding command: cache (0.019s)
    Debug (commands): Adding command: transient (0.02s)
    Debug (commands): Adding command: comment (0.022s)
    Debug (commands): Adding command: meta in comment Namespace (0.023s)
    Debug (commands): Adding command: menu (0.024s)
    Debug (commands): Adding command: item in menu Namespace (0.025s)
    Debug (commands): Adding command: location in menu Namespace (0.026s)
    Debug (commands): Deferring command: network meta (0.026s)
    Debug (commands): Adding command: option (0.027s)
    Debug (commands): Adding command: post (0.029s)
    Debug (commands): Adding command: meta in post Namespace (0.029s)
    Debug (commands): Adding command: term in post Namespace (0.03s)
    Debug (commands): Adding command: post-type (0.031s)
    Debug (commands): Adding command: site (0.032s)
    Debug (commands): Adding command: meta in site Namespace (0.033s)
    Debug (commands): Adding command: option in site Namespace (0.034s)
    Debug (commands): Adding command: taxonomy (0.034s)
    Debug (commands): Adding command: term (0.036s)
    Debug (commands): Adding command: meta in term Namespace (0.037s)
    Debug (commands): Adding command: user (0.039s)
    Debug (commands): Adding command: meta in user Namespace (0.04s)
    Debug (commands): Adding command: session in user Namespace (0.04s)
    Debug (commands): Adding command: term in user Namespace (0.041s)
    Debug (commands): Adding command: network (0.041s)
    Debug (hooks): Processing hook "after_add_command:network" with 1 callbacks (0.041s)
    Debug (hooks): On hook "after_add_command:network": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 634 (0.041s)
    Debug (commands): Adding command: meta in network Namespace (0.042s)
    Debug (commands): Adding command: db (0.045s)
    Debug (commands): Adding command: plugin (0.049s)
    Debug (commands): Adding command: theme (0.051s)
    Debug (commands): Adding command: mod in theme Namespace (0.052s)
    Debug (commands): Adding command: scaffold (0.054s)
    Debug (commands): Adding command: core (0.054s)
    Debug (commands): Adding command: verify-checksums in core Namespace (0.055s)
    Debug (commands): Adding command: verify-checksums in plugin Namespace (0.056s)
    Debug (commands): Adding command: export (0.057s)
    Debug (commands): Adding command: config (0.059s)
    Debug (commands): Adding command: core (0.061s)
    Debug (commands): Adding command: eval (0.062s)
    Debug (commands): Adding command: eval-file (0.062s)
    Debug (commands): Adding command: import (0.063s)
    Debug (commands): Adding command: media (0.065s)
    Debug (commands): Adding command: package (0.068s)
    Debug (commands): Adding command: cron (0.068s)
    Debug (commands): Adding command: event in cron Namespace (0.069s)
    Debug (commands): Adding command: schedule in cron Namespace (0.069s)
    Debug (commands): Adding command: embed (0.07s)
    Debug (commands): Adding command: fetch in embed Namespace (0.07s)
    Debug (commands): Adding command: provider in embed Namespace (0.071s)
    Debug (commands): Adding command: handler in embed Namespace (0.071s)
    Debug (commands): Adding command: cache in embed Namespace (0.072s)
    Debug (commands): Adding command: i18n (0.072s)
    Debug (commands): Adding command: make-pot in i18n Namespace (0.073s)
    Debug (commands): Adding command: make-json in i18n Namespace (0.074s)
    Debug (commands): Deferring command: language core (0.075s)
    Debug (commands): Deferring command: language plugin (0.076s)
    Debug (commands): Deferring command: language theme (0.077s)
    Debug (hooks): Immediately invoking on passed hook "after_add_command:site": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/language-command/language-command.php at line 39 (0.077s)
    Debug (commands): Adding command: switch-language in site Namespace (0.077s)
    Debug (commands): Adding command: language (0.078s)
    Debug (hooks): Processing hook "after_add_command:language" with 3 callbacks (0.078s)
    Debug (hooks): On hook "after_add_command:language": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 634 (0.078s)
    Debug (commands): Adding command: core in language Namespace (0.078s)
    Debug (hooks): On hook "after_add_command:language": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 634 (0.078s)
    Debug (commands): Adding command: plugin in language Namespace (0.079s)
    Debug (hooks): On hook "after_add_command:language": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 634 (0.079s)
    Debug (commands): Adding command: theme in language Namespace (0.079s)
    Debug (commands): Adding command: maintenance-mode (0.08s)
    Debug (commands): Adding command: rewrite (0.081s)
    Debug (commands): Adding command: rewrite (0.081s)
    Debug (commands): Adding command: cap (0.081s)
    Debug (commands): Adding command: role (0.082s)
    Debug (commands): Adding command: search-replace (0.085s)
    Debug (commands): Adding command: server (0.085s)
    Debug (commands): Adding command: shell (0.086s)
    Debug (commands): Adding command: super-admin (0.086s)
    Debug (commands): Adding command: widget (0.088s)
    Debug (commands): Adding command: sidebar (0.088s)
    Debug (bootstrap): Adding framework command: phar://wp-cli.phar/vendor/wp-cli/wp-cli/php/commands/cli.php (0.088s)
    Debug (commands): Adding command: cli (0.091s)
    Debug (commands): Adding command: cache in cli Namespace (0.091s)
    Debug (commands): Adding command: alias in cli Namespace (0.092s)
    Debug (bootstrap): Adding framework command: phar://wp-cli.phar/vendor/wp-cli/wp-cli/php/commands/help.php (0.092s)
    Debug (commands): Adding command: help (0.093s)
    Debug (bootstrap): No readable global config found (0.093s)
    Debug (bootstrap): No project config found (0.093s)
    Debug (bootstrap): argv: /usr/local/bin/wp migrator start 1559052011-80105cfaed681ea7-xxxxxxxxxxx --email=xxxx@gmail.com --debug --allow-root (0.094s)
    Debug (bootstrap): ABSPATH defined: /website/public_html/ (0.094s)
    Debug (bootstrap): Begin WordPress load (0.095s)
    Debug (bootstrap): wp-config.php path: /website/public_html/wp-config.php (0.095s)
    Debug (commands): Deferring command: migrator start (0.335s)
    Debug (commands): Adding command: elementor (0.398s)
    Debug (commands): Adding command: update in elementor Namespace (0.398s)
    Debug (bootstrap): Loaded WordPress (0.482s)
    Debug (hooks): Processing hook "before_run_command" with 1 callbacks (0.483s)
    Debug (hooks): On hook "before_run_command": WP_CLI\Bootstrap\RegisterDeferredCommands->add_deferred_commands() (0.483s)
    Debug (bootstrap): Adding deferred command: migrator start => {"parent":"migrator","callable":"migrator_command","args":{"is_deferred":true}} (0.483s)
    Debug (commands): Adding empty container for deferred command: migrator start (0.484s)
    Debug (commands): Adding command: start in migrator Namespace (0.484s)
    Debug (bootstrap): Running command: migrator start (0.484s)
    Error: Can not initiate the transfer.
    Error 500
    

    There is any way to debug this error ?
    It doesn’t generate logs in my error.log file

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter anibalardid

    (@jackalpret)

    I found this on the website log:

    
    
    [Tue May 28 11:46:22.875383 2019] [php7:warn] [pid 17057] [client 167.99.162.253:52128] PHP Warning:  PharData::buildFromDirectory(/website/public_html/wp-content/uploads/1559054775-196a98a5b43f43faf3d1c6135bf755832d845444/plugins/ocean-social-sharing.tar): failed to open stream: Permission denied in /website/public_html/wp-content/plugins/siteground-migrator/includes/class-siteground-migrator-files-service.php on line 205, referer: https://websitexxxx.com/wp-cron.php?doing_wp_cron=1559054782.4138810634613037109375
    
    [Tue May 28 11:46:22.875635 2019] [php7:error] [pid 17057] [client 167.99.162.253:52128] PHP Fatal error:  Uncaught PharException: unable to open new phar "/website/public_html/wp-content/uploads/1559054775-196a98a5b43f43faf3d1c6135bf755832d845444/plugins/ocean-social-sharing.tar" for writing in /website/public_html/wp-content/plugins/siteground-migrator/includes/class-siteground-migrator-files-service.php:205\nStack trace:\n#0 /website/public_html/wp-content/plugins/siteground-migrator/includes/class-siteground-migrator-files-service.php(205): PharData->buildFromDirectory('/website...')\n#1 /website/public_html/wp-content/plugins/siteground-migrator/includes/class-siteground-migrator-files-service.php(146): Siteground_Migrator_Files_Service->create_encrypted_archive('/plugins/ocean-...')\n#2 /website/public_html/wp-content/plugins/siteground-migrator/includes/class-siteground-migrator-background-process.php(55): Siteground_Migrator_Files_Service->prepare_archives_for_download()\n#3 /website_ in /website/public_html/wp-content/plugins/siteground-migrator/includes/class-siteground-migrator-files-service.php on line 205, referer: https://websitexxxx.com/wp-cron.php?doing_wp_cron=1559054782.4138810634613037109375
    
    
    Plugin Author Stanimir Stoyanov

    (@sstoqnov)

    SiteGround Representative

    Hey @jackalpret

    It seems that when you run the command, the cli user doesn’t have permissions to read.

    Please try with another user or sudo.

    Regards,
    Stanimir

    Thread Starter anibalardid

    (@jackalpret)

    Hi @sstoqnov !
    I’m in a new server now.

    I’m testing again running commands in my terminal, and I haven’t errors , but process doesnt finish, and It doesnt show errors (I run with –debug):

    
    Debug (commands): Deferring command: migrator start (0.337s)
    Debug (bootstrap): Loaded WordPress (0.398s)
    Debug (hooks): Processing hook "before_run_command" with 1 callbacks (0.399s)
    Debug (hooks): On hook "before_run_command": WP_CLI\Bootstrap\RegisterDeferredCommands->add_deferred_commands() (0.399s)
    Debug (bootstrap): Adding deferred command: migrator start => {"parent":"migrator","callable":"migrator_command","args":{"is_deferred":true}} (0.399s)
    Debug (commands): Adding empty container for deferred command: migrator start (0.399s)
    Debug (commands): Adding command: start in migrator Namespace (0.399s)
    Debug (bootstrap): Running command: migrator start (0.399s)
    Success: Transfer started. Creating archives of files...
    

    And then the command prompt cames again and nothing happends

    • This reply was modified 4 years, 9 months ago by anibalardid.
    Thread Starter anibalardid

    (@jackalpret)

    More info …
    cat wp-content/siteground-migrator.log

    
    [05-Jul-2019 20:25:09 UTC] INFO: Transfer started. Creating archives of files... 
    [05-Jul-2019 20:25:09 UTC] INFO: Updating transfer id. 
    [05-Jul-2019 20:25:09 UTC] INFO: Updating transfer psk. 
    [05-Jul-2019 20:25:10 UTC] INFO: Site domain to be changed to xxxx.com.ar/11223344/ 
    [05-Jul-2019 20:25:11 UTC] INFO: Transfer started. Creating archives of files... 
    [05-Jul-2019 20:25:11 UTC] INFO: Critical Environment Error 
    [05-Jul-2019 20:25:11 UTC] ERROR: Array
    (
        [type] => 1
        [message] => Uncaught PharException: unable to open new phar "/home/test3.xxxx.com/public_html/wp-content/uploads/1562358308-7b50a53f485962311418e05324e956f35e17d612/plugins/my-simple-space.tar" for writing in /home/test3.xxxx.com/public_html/wp-content/plugins/siteground-migrator/includes/class-siteground-migrator-files-service.php:205
    Stack trace:
    #0 /home/test3.xxxx.com/public_html/wp-content/plugins/siteground-migrator/includes/class-siteground-migrator-files-service.php(205): PharData->buildFromDirectory('/home/test3.ser...')
    #1 /home/test3.xxxx.com/public_html/wp-content/plugins/siteground-migrator/includes/class-siteground-migrator-files-service.php(146): Siteground_Migrator_Files_Service->create_encrypted_archive('/plugins/my-sim...')
    #2 /home/test3.xxxx.com/public_html/wp-content/plugins/siteground-migrator/includes/class-siteground-migrator-background-process.php(55): Siteground_Migrator_Files_Service->prepare_archives_for_download()
    #3 /home/test3.server2.d
        [file] => /home/test3.xxxx.com/public_html/wp-content/plugins/siteground-migrator/includes/class-siteground-migrator-files-service.php
        [line] => 205
    )
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘(wp-cli) Error 500’ is closed to new replies.