cstaelen/deployer-wp-recipes 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

cstaelen/deployer-wp-recipes

最新稳定版本:0.1.0

Composer 安装命令:

composer require cstaelen/deployer-wp-recipes

包简介

Wordpress deployer recipes

README 文档

README

For the record, those recipes was written using a personal Wordpress stack based on Bedrock (Thanks to the great roots.io team), using phpdotenv package. But it can be used in many other configuration .

##Features

  • Deploy repository code with gulp compiled files
  • Sync Wordpress uploads
  • Pull and push Wordpress database
  • Clean up some files

##Requirements

##Installation

Make sure to include recipe files in your deploy.php:

require 'vendor/cstaelen/deployer-wp-recipes/recipes/assets.php';
require 'vendor/cstaelen/deployer-wp-recipes/recipes/cleanup.php';
require 'vendor/cstaelen/deployer-wp-recipes/recipes/db.php';
require 'vendor/cstaelen/deployer-wp-recipes/recipes/uploads.php';

##Configuration

Just add those lines below in your deploy.php with your own values :

set('wp-recipes', [
    'theme_name'        => 'Your WP theme folder name',
    'theme_dir'         => 'path/to/your/theme/folder',
    'theme_dist'        => 'theme_release', // Will be rename with theme_name
    'wwwroot_dir'       => 'web', //VHOST ROOT DIR
    'shared_dir'        => '{{deploy_path}}/shared', 
    'gulp_cmd'          => 'gulp build',
    'assets_dist'       => 'path/to/theme/folder/dist',
    'local_wp_url'      => 'http://local.dev',
    'remote_wp_url'     => 'http://mywebsite.com',
    'clean_after_deploy'=>  [
        'deploy.php',
        '.gitignore',
        '*.md'
    ]
]);

##Available tasks

Upload your WP database : dep db:push prod Download your WP database : dep db:pull prod Sync WP uploads with rsync : dep uploads:sync prod

You can also use those rules below in your deploy.php file to compile and deploy assets and cleanup some useless files on your staging/production server :

after('deploy', 'deploy:assets');
after('deploy', 'deploy:cleanup');

WP recipes using phpdotenv

If you are using phpdotenv to configure your servers as the awesome Bedrock Wordpress Stack do, you can use those task rules below to grab WP_HOME value filled in your .env file.

before('db:cmd:pull', 'env:uri');
before('db:cmd:push', 'env:uri');

In order to do that, we assume your local .env file is in the root project folder, and the remote one in the repo shared folder.

Make sure to leave empty those config values :

set('wp-recipes', [
	...
    'local_wp_url'      => '',
    'remote_wp_url'     => ''
    ...
]);

统计信息

  • 总下载量: 3.36k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 14
  • Watchers: 0
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-07-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固