Skip to content

vp restore-site error from freshly cloned repo #48

@tatemz

Description

@tatemz

Copied from issue #1046 inadvertently posted on plugin repo.

The Error:

Fatal error: Call to a member function resolve() on null in /var/www/html/content/plugins/versionpress/src/Cli/vp-internal.php on line 52

Some Notes:

  • I am trying to restore a site using the 2nd scenario suggested method here
  • I am using WP inside the subdirectory wp
  • I am using a modified version of the official wordpress Docker container (with added mysql-client, wp-cli, and some install fixes to aid in the wp subdirectory)

Running a failed restore, then activating the plugin, then re-running the restore ended up giving me the proper results.

If the vp restore-site command is supposed to initialize the WordPress database, then it should be able to work without the plugin activated.

My issue above was solved (hackily) only because I ran these commands in this order:

  1. wp vp restore-site (with necessary --require option) - This command failed with the aforementioned error
  2. wp plugin activate versionpress (this only worked because the previous command did a half-installation)
  3. wp vp restore-site (with necessary --require option) - This command is identical to the first, but succeeded this time.

I am using this Docker container based on the official WordPress image. See the Dockerfile for how I have customized it to run versionpress commands from inside the container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions