Is the vendor directory needed in a production environment?


I am using bedrock and deploying via bash script / rsync to a shared hosting.
I was just wondering wether the /vendor folder is needed in a production environment or if I can add it to my rsync ignore list.
At first glance I thought “no, I don’t need composer and this stuff in my production environment”, but then I saw there is also the wp-password-bcrypt plugin in there.
And also /vender/autoload.php is called from wp_config.php.
So I’m a bit confused which files I need just to run wordpress and which are needed only for package management.
I am also asking because some of the files (e.g.) the autoload.php just changed after “composer update”.



Yes vendor directory is needed. It contains vendored deps that your app needs to run, as well as the autoloader.

1 Like