• Resolved gresakg

    (@gresakg)


    Hi, I have an automated script for upgrading all plugins on all websites on a server. This command fails with fatal error when executing

    $ wp plugin update --all --path=/var/www/html/webroot/

    where “webroot” is actually the webroot of a particular site.

    It used to work untill the last update a week ago. Today while updating, I got this error

    PHP Fatal error: Uncaught UnexpectedValueException: DirectoryIterator::__construct(/data/www/html/webroot/wp-content/plugins/simple-lightbox/includes/class.options.php): failed to open dir: Not a directory in /data/www/html/webroot/wp-content/plugins/simple-lightbox/includes/class.utilities.php:1372

    I have php 7.3 running on that machine, and the latest version od wp-cli (2.6.0).

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

    (@gresakg)

    Update: it’s a problem of symlink resolution. /var links to /data
    Changing the command to

    $ wp plugin update --all --path=/data/www/html/webroot/

    did the job.

    Still, it is interesting that this was not a problem until the very last update.

    Plugin Author Archetyped

    (@archetyped)

    Yes, that is strange, but glad to hear you found the cause of your issue.

    I had the same issue updating from 2.9.0 to 2.9.1 via wp-cli. I uninstalled the plugin and a fresh install of 2.9.1 didn’t throw any errors initially. However any subsequent wp-cli commands (update core, update theme, etc) immediately threw out the same errors referencing simple-lightbox. Same for 2.9.0 or 2.9.1. I downgraded to 2.8.1 and manually changed the version higher than 2.9.1 as a workaround for now.

    Plugin Author Archetyped

    (@archetyped)

    SLB 2.9.2 includes optimizations for handling symbolic links, so please post an update if you are still experiencing this error after updating the plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal error when upgrading with wp-cli’ is closed to new replies.