承接 erikgreasy/wp-console 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱: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

统计信息

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

GitHub 信息

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

其他信息

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