Title: Fatal error when upgrading with wp-cli
Last modified: September 7, 2022

---

# Fatal error when upgrading with wp-cli

 *  Resolved [gresakg](https://wordpress.org/support/users/gresakg/)
 * (@gresakg)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-when-upgrading-with-wp-cli/)
 * 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](https://wordpress.org/support/users/gresakg/)
 * (@gresakg)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-when-upgrading-with-wp-cli/#post-15986409)
 * 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](https://wordpress.org/support/users/archetyped/)
 * (@archetyped)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-when-upgrading-with-wp-cli/#post-15993286)
 * Yes, that is strange, but glad to hear you found the cause of your issue.
 *  [.gabriel.](https://wordpress.org/support/users/gabriel-1/)
 * (@gabriel-1)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-when-upgrading-with-wp-cli/#post-16007244)
 * 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](https://wordpress.org/support/users/archetyped/)
 * (@archetyped)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-when-upgrading-with-wp-cli/#post-16029001)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/simple-lightbox.svg)
 * [Simple Lightbox](https://wordpress.org/plugins/simple-lightbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-lightbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-lightbox/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-lightbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-lightbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-lightbox/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [wp-cli](https://wordpress.org/support/topic-tag/wp-cli/)

 * 4 replies
 * 3 participants
 * Last reply from: [Archetyped](https://wordpress.org/support/users/archetyped/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-when-upgrading-with-wp-cli/#post-16029001)
 * Status: resolved