PHPackages                             travis/wordpress - 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. travis/wordpress

ActiveLibrary

travis/wordpress
================

A PHP library for working w/ the Wordpress API plugin.

1.1.0(5y ago)771.6k19MITPHPPHP &gt;=5.3.0

Since Jun 27Pushed 5y ago5 watchersCompare

[ Source](https://github.com/swt83/php-wordpress)[ Packagist](https://packagist.org/packages/travis/wordpress)[ RSS](/packages/travis-wordpress/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Wordpress
=========

[](#wordpress)

A PHP library for working w/ the [Wordpress API plugin](https://wordpress.org/plugins/json-api/).

Install
-------

[](#install)

Normal install via Composer.

### Disable the Public Side of Wordpress

[](#disable-the-public-side-of-wordpress)

Since you are using the API, you should disable the public side of your Wordpress installation. One way to do that is to open the `index.php` file in your Wordpress directory and add this code to the top:

```
if (!isset($_GET['json'])) die();
```

Usage
-----

[](#usage)

Send a request by passing an endpoint, controller, method, and params:

```
use Travis\Wordpress;

// set endpoint
$endpoint = 'http://yourwordpress.com/'; // ending slash is important

// get a page
$page = Wordpress::run($endpoint, 'core', 'get_page', [
    'post_type' => 'page',
    'slug' => 'about',
));

// get a post
$post = Wordpress::run($endpoint, 'core', 'get_post', [
    'post_type' => 'post',
    'id' => 100,
));

// get recent posts
$posts = Wordpress::run($endpoint, 'core', 'get_recent_posts', [
    'post_type' => 'post',
    'count' => 10,
    'page' => 1,
));
```

See the [documentation](https://github.com/dphiffer/wp-json-api) for a full list of available methods.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity59

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

Every ~2041 days

Total

2

Last Release

1937d ago

### Community

Maintainers

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

---

Top Contributors

[![swt83](https://avatars.githubusercontent.com/u/907900?v=4)](https://github.com/swt83 "swt83 (38 commits)")

### Embed Badge

![Health badge](/badges/travis-wordpress/health.svg)

```
[![Health](https://phpackages.com/badges/travis-wordpress/health.svg)](https://phpackages.com/packages/travis-wordpress)
```

PHPackages © 2026

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