Download the PHP package edpittol/wp-cli-api without Composer

On this page you can find all versions of the php package edpittol/wp-cli-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-cli-api

WP-CLI API

An API to manipulate an WordPress installation by code. This project is an interface to WP-CLI. It manipulate the core, plugins, themes, options and another data wrapping with the CLI calls.

The WP-CLI is an excellent tool to maintain WordPress sites. However the unique way of execute your code is in the terminal. It’s impossible access directly the project functions to use with another application. For example, to get a status of a plugin.

The objective of the project is solve this. Through of entity classes to represent site objects and helper classes to manipulate the packages and data. Using the WP-CLI as background to get the data and execute tasks.

This project doesn't support multisite installation and interactive commands.

Installing

The best way to install the package is using Composer with the following command.

$ composer require "edpittol/wp-cli-api"

You can add the dependency directly in your composer.json file.

"require": {
    "edpittol/wp-cli-api": "~0.1"
}

Examples

Check and update WP core.

use WP_CLI\Api\Command\Core\CheckUpdateCommand;
use WP_CLI\Api\Command\Core\UpdateCommand;
use WP_CLI\Api\Command\Core\VersionCommand;

$check = new CheckUpdateCommand();
if( ! empty($check->run() ) ) {
    $version = new VersionCommand();
    echo $version->run(); // 4.5

    $update = new UpdateCommand();
    $update->run();

    echo $version->run(); // 4.6.1
}

Contributing

The first step of the project is cover all WP-CLI commands. After, improve and facilitate the use of the API. For a while, the commands covered are core and db.

Issues and pull requests are welcome.

Tests

Clone the project

$ git clone [email protected]:edpittol/wp-cli-api.git

Go to clonned project directory

$ cd wp-cli-api

Run PHPUnit

$ ./vendor/bin/phpunit

License

The project is licensing under GPLv3. See the LICENSE.

Changelog

0.1


All versions of wp-cli-api with dependencies

PHP Build Version
Package Version
Requires wp-cli/wp-cli Version ^0.24.1
psr/log Version ^1.0
jms/serializer Version ^1.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package edpittol/wp-cli-api contains the following files

Loading the files please wait ....