johnpbloch/wordpress-core-installer
关于
A composer installer for WordPress core so I can stop saying core is a wordpress-plugin type package.
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文WordPress Core Installer
A custom Composer plugin to install WordPress core outside of vendor.
This installer is meant to support a rather specific WordPress installation setup in which WordPress is installed in a subdirectory (see the WordPress codex on that subject) and in which the location of WP_CONTENT_DIR and WP_CONTENT_URL have been customized to be outside of WordPress core (see the WordPress codex on that subject). This is because composer will delete your whole wp-content directory every time it updates core if you don't separate the two. If that installation setup isn't what you are looking for, then this installer is probably not something you will want to use.
For more information on this site setup and using Composer to manage a whole WordPress site, check out @Rarst's informational website which also includes a site stack example using this package.
Usage
To set up a custom WordPress build package to use this as a custom installer, add the following to your package's composer file:
"type": "wordpress-core",
"require": {
"johnpbloch/wordpress-core-installer": "^2.0"
}
If you need to maintain support for PHP versions lower than 5.6 (not recommended!), use ^1.0 as your version constraint in the above.
By default, this package will install a wordpress-core type package in the wordpress directory. To change this you can add the following to either your custom WordPress core type package or the root composer package:
"extra": {
"wordpress-install-dir": "custom/path"
}
The root composer package can also declare custom paths as an object keyed by package name:
"extra": {
"wordpress-install-dir": {
"wordpress/wordpress": "wordpress",
"johnpbloch/wordpress-core": "jpb-wordpress"
}
}
License
This is licensed under the GPL version 2 or later.
Changelog
2.0.0
- Added support for Composer v2. Special thanks to @Ayesh for the original pull request to add this support.
- Bumped minimum required PHP version to 5.6 (same as WP). If you need to stick with an older PHP version, you're probably ok with also sticking with an older version of Composer and can continue to use
^1.0as your version constraint. - Other various fixes and improvements to README, tests, etc.
1.0.0
- Initial stable release
- Added tests and CI
- Support added for custom vendor directories
- Added sanity check for overwriting sensitive directories
探索相关项目
加载中…