wodby/wordpress-composer
Composer 安装命令:
composer create-project wodby/wordpress-composer
包简介
Project template for WordPress projects with composer
README 文档
README
This project template should provide a kickstart for managing your site dependencies with Composer.
This project consist of:
- WordPress core: johnpbloch/wordpress-core-installer
- Repository https://wpackagist.org/ to install WordPress plugins and themes
composer/installersto set custom paths for plugins and themesdrupal-composer/preserve-pathsto exclude paths for plugins and themes under version controlwodby.ymlthat runscomposer install. You can remove it if you're not using Wodby
Current WordPress core: ~5.0
Paths
By default, wordpress core will be installed in ./web directory. Plugins and themes will be installed in ./web/wp-content/plugins and ./web/wp-content/themes. Point your Apache vhost or similar to this project's ./web directory.
Usage
First you need to install composer.
Note: The instructions below refer to the global composer installation. You might need to replace
composerwithphp composer.phar(or similar) for your setup.
Start a new project:
composer create-project wodby/wordpress-composer some-dir --stability dev --no-interaction
The composer create-project command passes ownership of all files to the project that is created. You should create a new git repository, and commit all files not excluded by the .gitignore file.
How to install WordPress plugins and themes?
With composer require ... you can download new dependencies to your installation.
cd some-dir
composer require wpackagist-plugin/wp-cfm
How to manage my custom themes and plugins under version control?
- Exclude path to your plugin or theme from .gitignore. Example for theme under
web/wp-content/themes/my-custom-theme/:!web/ web/* !web/wp-content/ web/wp-content/* !web/wp-content/themes/ web/wp-content/themes/* !web/wp-content/themes/my-custom-theme/ - Add the same path to your composer.json under
extra > preserve-paths:"preserve-paths": [ "web/wp-content/themes/custom" ] - Add your plugin/theme directory under version control
- Run
composer install. Composer will install WordPress core and keep your custom theme
Deployment via Wodby
- Create a new project.
- Connect the repository to Wodby.
- Deploy new app, choose WordPress stack, on the 2nd step of the form choose connected repository and enter
webas Codebase dir.
wodby/wordpress-composer 适用场景与选型建议
wodby/wordpress-composer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.09k 次下载、GitHub Stars 达 69, 最近一次更新时间为 2018 年 07 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 wodby/wordpress-composer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 wodby/wordpress-composer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.09k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 69
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2018-07-04