이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

WP Composer Sync

설명

WP Composer Sync is a WordPress plugin that keeps a WordPress installation’s composer.json synchronised with the plugins installed.

Usage

Once installed the plugin should be largely set and forget, however there a couple of gotchas.

1) Commercial plugins that are not available from the WordPress.org plugins repository will still be added you will need to manually modify the repository (eg. wpackagist, wp-premium or using a custom installer or repository) or add your custom plugins first. WP Composer Sync will then honor these repositories and keep them synchronised as well.
2) When composer installs a package, it completely empties the target directory before installing the new files. As such, the WordPress path should be designated for WordPress core files only, as anything else (e.g. plugins, themes, and wp-config.php) will be wiped away on install or update. It is recommended that you keep your wp-config.php file in the parent directory of the WordPress path (WordPress can find it there automatically) and replace the wp-content directory with a symlink to your real wp-content folder. See link for more details.
3) Compposer require versioning wildcards (eg. *, 1.*, etc) will not be honoured (as WordPress does not adhere to this). They will be replaced by the exact version number in use by WordPress.

About

Why?

Composer is a great way to manage WordPress and its plugins. However in real life it runs the risk of becoming outdated with the actual contents of the website when admin users are installing plugins via wp-admin or S/FTP.

How?

Using WordPress’s “plugins_loaded” action and link, this plugin will check your composer.json file for any outdated or unfound plugins and will automatically add them to the require section.

Roadmap

The plugin is production ready however there are some additional functions and features which will be added in the future:

1) Add ability to select bewteen https://github.com/balbuf/composer-wp and wpackagist
2) Currently only syncs plugin and wordpress core, add ability to sync themes
3) Research some ways to monitor plugin-uploads and changes more effectively (eg. link link, link and link or Transients link link or link)

설치

Regardsless of installation method the machine where you are running WordPress requires Subversion to be installed to allow access to WordPress’s SVN repositories. On *NIX based servers you can simply:

`

apt -yq install subversion
`

New WordPress Install

You can use composer to create your new WordPress instance and include WP Composer Sync. In the root of your project folder simply create a composer.json file containing:

`

{
“name”: “The name of your WordPress site”,
“extra”: {
“composer-wp”: {
“repositories”: [],
“vendors”: {},
“installer”: {
“wordpress-path”: “web”
}
}
},
“require”: {
“wordpress/wordpress”: “^4.9.7”,
“wordpress-plugin/wp-composer-sync”: “*”
},
“scripts”: {
“pre-cmd”: [
“composer global require balbuf/composer-wp && composer global update balbuf/composer-wp”
],
“pre-install-cmd”: “@pre-cmd”,
“pre-update-cmd”: “@pre-cmd”
}
}
`

This will install wordpress in a web/ sub-directory (recommended, but you can change the web root by modifying the “wordpress-path”). It will also globally install link.

Existing WordPress Install

If you wish to install WP Composer Sync into an existing (composer managed) WordPress install start by installing link:

`

$ composer global require balbuf/composer-wp
`

Now you need to add WP Composer Sync to your WordPress install either via wp-admin or via composer:

`

$ composer global require wordpress/wp-composer-sync
`

FAQ

Installation Instructions

Regardsless of installation method the machine where you are running WordPress requires Subversion to be installed to allow access to WordPress’s SVN repositories. On *NIX based servers you can simply:

`

apt -yq install subversion
`

New WordPress Install

You can use composer to create your new WordPress instance and include WP Composer Sync. In the root of your project folder simply create a composer.json file containing:

`

{
“name”: “The name of your WordPress site”,
“extra”: {
“composer-wp”: {
“repositories”: [],
“vendors”: {},
“installer”: {
“wordpress-path”: “web”
}
}
},
“require”: {
“wordpress/wordpress”: “^4.9.7”,
“wordpress-plugin/wp-composer-sync”: “*”
},
“scripts”: {
“pre-cmd”: [
“composer global require balbuf/composer-wp && composer global update balbuf/composer-wp”
],
“pre-install-cmd”: “@pre-cmd”,
“pre-update-cmd”: “@pre-cmd”
}
}
`

This will install wordpress in a web/ sub-directory (recommended, but you can change the web root by modifying the “wordpress-path”). It will also globally install link.

Existing WordPress Install

If you wish to install WP Composer Sync into an existing (composer managed) WordPress install start by installing link:

`

$ composer global require balbuf/composer-wp
`

Now you need to add WP Composer Sync to your WordPress install either via wp-admin or via composer:

`

$ composer global require wordpress/wp-composer-sync
`

후기

이 플러그인에 대한 평가가 없습니다.

기여자 & 개발자

“WP Composer Sync”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “WP Composer Sync”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.0

  • Initial version