This composer plugin sets installation paths for WordPress core
, plugins
, mu-plugins
, themes
and drop-ins
outside of vendor directory.
$ composer require piotrpress/wordpress-installer
Plugin sets installation paths according to package type:
wordpress-core
-/wp-core
wordpress-theme/{$slug}
-/wp-content/themes/{$slug}
where$slug
is a desired WordPress theme slugwordpress-plugin/{$slug}
-/wp-content/plugins/{$slug}
where$slug
is a desired WordPress plugin slugwordpress-muplugin/{$slug}
-/wp-content/mu-plugin/{$slug}
where$slug
is a desired WordPress mu-plugin slugwordpress-dropin/{$slug}
-/wp-content/{$slug}
where$slug
is a desired WordPress drop-in slug
Installation paths are fixed. To customize paths, use other plugin instead, for example one of listed installers:
- composer/installers
- oomphinc/composer-installers-extender
- johnpbloch/wordpress-core-installer
- fancyguy/webroot-installer
Check out example implementation in the piotrpress/wordpress package.
- PHP >=
7.4
version. - Composer ^
2.0
version.