Class 'Jetpack_Options' not found, composer dump-autoload not helping

I am cloning a friends WP installation using mysqldump, rsync and docker to fetch all files and data.

When running the site, I get the following error:

Fatal error:  Uncaught Error: Class 'Jetpack_Options' not found in /var/www/html/wp-content/plugins/jetpack/class.jetpack.php:2154
Stack trace:
#0 /var/www/html/wp-content/plugins/jetpack/class.jetpack.php(702): Jetpack::get_option('edit_links_caly...')
#1 /var/www/html/wp-content/plugins/jetpack/class.jetpack.php(403): Jetpack-gt;__construct()
#2 /var/www/html/wp-content/plugins/jetpack/load-jetpack.php(89): Jetpack::init()
#3 /var/www/html/wp-content/plugins/jetpack/jetpack.php(149): require_once('/var/www/html/w...')
#4 /var/www/html/wp-settings.php(371): include_once('/var/www/html/w...')
#5 /var/www/html/wp-config.php(90): require_once('/var/www/html/w...')
#6 /var/www/html/wp-load.php(37): require_once('/var/www/html/w...')
#7 /var/www/html/wp-blog-header.php(13): require_once('/var/www/html/w...')
#8 /var/www/html/index.php(17): require('/var/www/html/w...')
#9 {main}
thrown in b/var/www/html/wp-content/plugins/jetpack/class.jetpack.php/b on line 154

The class exists, it is not missing, so I think this is an autoloading problem.

I tried to fix the problem by navigating into /var/www/html/wp-content/plugins/jetpack/, installing composer, and running composer dump-autoload.

/var/www/html/wp-content/plugins/jetpack # php /composer.phar dump-autoload
Generating autoload files
Generated autoload files

This doesn't fix the problem.

How do I fix the classmaps of a mirrored wordpress codebase?

Topic autoloading plugin-jetpack local-installation Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.