erikgreasy/wp-console 问题修复 & 功能扩展

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

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

erikgreasy/wp-console

最新稳定版本:0.1.0

Composer 安装命令:

composer require erikgreasy/wp-console

包简介

Custom cli for WordPress, inspired by Laravel's artisan.

README 文档

README

CLI application inspired by artisan in Laravel framework. Based on the Symfony console component.

Instantiating in project

Install with composer

composer require erikgreasy/wp-console

create "cli" (alernative to artisan) file in the root of your project

#!/usr/bin/env php
<?php

use Erikgreasy\WpConsole\ConsoleApplication;

require __DIR__ . '/vendor/autoload.php';

// load WordPress so we can use WP functions in commands
require __DIR__ . '/web/wp/wp-load.php';

new ConsoleApplication(__DIR__ . '/commands');

Create directory for commands

mkdir commands

Autoload your commands with composer - add autoload into composer.json

"autoload": {
    "psr-4": {
        "PixelConsole\\": "commands"
    }
}

and run

composer dump-autoload

Creating commands

To be able to create new commands, you need to instantiate the CLI in your project, following the steps higher.

php cli make:command CommandName

For more information about commands, refer to Symfony console docs.

Buil-in commands

Database

  • db:dump - dumps the DB sql file into backup folder in the root of project
  • db:import file_name.sql - import the specified file_name.sql into your DB

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固