foliolabs/folioshell
Composer 安装命令:
composer create-project foliolabs/folioshell
包简介
This command-line script helps to ease the management of WordPress sites in your development environment.
关键字:
README 文档
README
This is a script developed by Foliolabs Team to ease the management of WordPress sites.
It is designed to work on Linux and MacOS. Windows users can use it in Nooku Vagrant box
Installation
-
Download or clone this repository.
-
Make the
folioshellcommand executable:$ chmod u+x /path/to/folioshell/bin/folioshell -
Configure your system to recognize where the executable resides. There are 3 options:
-
Create a symbolic link in a directory that is already in your PATH, e.g.:
$ ln -s /path/to/folioshell/bin/folioshell /usr/bin/folioshell -
Explicitly add the executable to the PATH variable which is defined in the the shell configuration file called .profile, .bash_profile, .bash_aliases, or .bashrc that is located in your home folder, i.e.:
export PATH="$PATH:/path/to/folioshell/bin:/usr/local/bin" -
Add an alias for the executable by adding this to you shell configuration file (see list in previous option):
$ alias folioshell=/path/to/folioshell/bin/folioshell
For options 2 and 3 above, you should log out and then back in to apply your changes to your current session.
-
-
Test that
folioshellexecutable is found by your system:$ which folioshell -
From
folioshellroot (/path/to/folioshell), run Composer to fetch dependencies.$ composer install
For available options, try running:
folioshell --list
Usage
Create Sites
To create a site with the latest WordPress version, run:
folioshell site:create testsite
The newly installed site will be available at /var/www/testsite and testsite.dev after that. You can login into your fresh WordPress installation using these credentials: admin / admin.
By default the web server root is set to /var/www. You can pass --www=/my/server/path to commands for custom values.
You can choose the WordPress version to be installed:
folioshell site:create testsite --wordpress=4.2
You can pick any branch from the Git repository (e.g. master, staging) using this command.
You can also add your projects into the new site by symlinking. See the Symlinking section below for detailed information.
folioshell site:create testsite --symlink=project1,project2
For more information and available options, try running:
folioshell site:create --help
Delete Sites
You can delete the sites you have created by running:
folioshell site:delete testsite
Symlink Plugins
Let's say you are working on your own WordPress component called Awesome and want to develop it with the latest WordPress version.
By default your code is assumed to be in ~/Projects. You can pass --projects-dir=/my/code/is/here to commands for custom values.
Please note that your source code should resemble the WordPress wp-content folder structure for symlinking to work properly. For example, plugins folder should reside in ~/Projects/projectname/code/plugins/projectname.
Now to create a new site, execute the site:create command and add a symlink option:
folioshell site:create testsite --symlink=projectname
Or to symlink your code into an existing site:
folioshell extension:symlink testsite projectname
This will symlink all the folders from the projectname folder into testsite.dev.
Run discover install to make your component available to WordPress and you are good to go!
For more information on the symlinker, run:
folioshell extension:symlink --help
Install Plugins
You can install plugins from WordPress's Official Plugin Repository on command line to install plugins.
folioshell extension:install testsite pluginslug
You need to use the unique slug of the plugin.
For more information, run:
folioshell extension:install --help
Alternatively, you can install plugins using packages or url using the extension:installfile command. Example:
folioshell extension:installfile testsite /home/vagrant/pluginone.v1.x.zip /home/vagrant/plugintwo.v2.x.tar.gz
And as URL
folioshell extension:installfile testsite http://url.com/to/pluginone.v1.x.zip http://url.com/to/plugintwo.v2.x.tar.gz
This will install both the pluginone.v1.x.zip and plugintwo.v2.x.tar.gz packages.
Activate Plugins
extension:install and extension:installfile automatically activates the plugin.
Extra commands
There a few other commands available for you to try out as well :
folioshell versions: list the available WordPress versions.- Use
folioshell versions --refreshto get the latest tags and branches from the official WordPress repository. - To purge the cache of all WordPress packages, add the
--clear-cacheflag to this command.
Requirements
- Composer
Contributing
Fork the project, create a feature branch, and send us a pull request.
Authors
See the list of contributors.
License
The foliolabs/folioshell repository is licensed under the MPL v2 license - see the LICENSE file for details.
foliolabs/folioshell 适用场景与选型建议
foliolabs/folioshell 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 994 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 03 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「wordpress」 「console」 「tools」 「wp」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 foliolabs/folioshell 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 foliolabs/folioshell 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 foliolabs/folioshell 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This class provides you with an easy-to-use interface to progress bars.
A set of useful PHP classes.
A Laravel package to retrieve data from Google Search Console
Additional artisan commands for Laravel
A table generator class for the PHP CLI.
GHT D-Tools Bundle
统计信息
- 总下载量: 994
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MPL-2.0
- 更新时间: 2019-03-11