Composer change WordPress plugin package installation directory

I’m working on a theme that requires the ReduxFramework for options.

For Redux to work it needs to be either:

Installed as a plugin
Included in the theme (embedded version)

I would like to use the embedded version and I would like to use composer to include it as a project dependency.

The problem is, running:

composer require redux-framework/redux-framework

installs the framework inside a wp-content/plugins directory inside my theme folder. For clarification this is the final path of the installed redux dependency:

wordpress-installation/wp-content/themes/my-theme/wp-content/plugins/ReduxFramework

I would like to change this so that the install directory is:

wordpress-installation/wp-content/themes/my-theme/vendor/ReduxFramework

How do I do this?

Read more here:: Composer change WordPress plugin package installation directory

Leave a Reply

Your email address will not be published. Required fields are marked *