定制 foliolabs/folioshell 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

  1. Download or clone this repository.

  2. Make the folioshell command executable:

    $ chmod u+x /path/to/folioshell/bin/folioshell

  3. Configure your system to recognize where the executable resides. There are 3 options:

    1. 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

    2. 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"

    3. 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.

  4. Test that folioshell executable is found by your system:

    $ which folioshell

  5. From folioshell root (/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 --refresh to get the latest tags and branches from the official WordPress repository.
  • To purge the cache of all WordPress packages, add the --clear-cache flag 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 我们能提供哪些服务?
定制开发 / 二次开发

基于 foliolabs/folioshell 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 994
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 6
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MPL-2.0
  • 更新时间: 2019-03-11