PHPackages                             edpittol/wp-cli-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. edpittol/wp-cli-api

AbandonedLibrary[API Development](/categories/api)

edpittol/wp-cli-api
===================

An API to manipulate an WordPress installation by code.

0.1(9y ago)021GPLv3PHP

Since Nov 25Pushed 9y ago1 watchersCompare

[ Source](https://github.com/edpittol/wp-cli-api)[ Packagist](https://packagist.org/packages/edpittol/wp-cli-api)[ RSS](/packages/edpittol-wp-cli-api/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (6)Versions (2)Used By (0)

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

[](#installing)

The best way to install the package is using [Composer](http://getcomposer.org/) 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
--------

[](#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
------------

[](#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
-----

[](#tests)

Clone the project

```
$ git clone git@github.com:edpittol/wp-cli-api.git

```

Go to clonned project directory

```
$ cd wp-cli-api

```

Run PHPUnit

```
$ ./vendor/bin/phpunit

```

License
-------

[](#license)

The project is licensing under GPLv3. See the [LICENSE](LICENSE).

Changelog
---------

[](#changelog)

### 0.1

[](#01)

- Wrap the WP-CLI call using Symfony Process
- Process log interface (PSR-3)
- Implement 'core' and 'db' commands

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3458d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ba5aff8185caefed493f8ab1807093635f26076b5785735eeb67cabb4ed8547d?d=identicon)[edpittol](/maintainers/edpittol)

---

Top Contributors

[![edpittol](https://avatars.githubusercontent.com/u/352790?v=4)](https://github.com/edpittol "edpittol (29 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/edpittol-wp-cli-api/health.svg)

```
[![Health](https://phpackages.com/badges/edpittol-wp-cli-api/health.svg)](https://phpackages.com/packages/edpittol-wp-cli-api)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69333.0M114](/packages/algolia-algoliasearch-client-php)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

517.9M7](/packages/avalara-avataxclient)[alexacrm/dynamics-webapi-toolkit

Web API toolkit for Microsoft Dynamics 365 and Dynamics CRM

81324.1k1](/packages/alexacrm-dynamics-webapi-toolkit)[webit/w-firma-api

wFirma.pl API

1820.2k](/packages/webit-w-firma-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
