PHPackages                             threesquared/laravel-wp-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. [HTTP &amp; Networking](/categories/http)
4. /
5. threesquared/laravel-wp-api

ActiveLibrary[HTTP &amp; Networking](/categories/http)

threesquared/laravel-wp-api
===========================

Laravel package for the Wordpress JSON REST API

2.1.1(10y ago)1310.3k14[1 issues](https://github.com/threesquared/laravel-wp-api/issues)[1 PRs](https://github.com/threesquared/laravel-wp-api/pulls)MITPHPPHP &gt;=5.5.0

Since Jul 7Pushed 5y ago7 watchersCompare

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

READMEChangelog (3)Dependencies (3)Versions (6)Used By (0)

laravel-wp-api
==============

[](#laravel-wp-api)

[![Build Status](https://camo.githubusercontent.com/fd148c609e63b95f5f58d70e55d8efab727b589d4827b78670e10393c456e9f7/68747470733a2f2f7472617669732d63692e6f72672f7468726565737175617265642f6c61726176656c2d77702d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/threesquared/laravel-wp-api) [![Latest Stable Version](https://camo.githubusercontent.com/2e047833b7d132b7f43c20f4faaba12b01efb53ca80f1dee5026b28bbf836a15/68747470733a2f2f706f7365722e707567782e6f72672f7468726565737175617265642f6c61726176656c2d77702d6170692f762f737461626c65)](https://packagist.org/packages/threesquared/laravel-wp-api)

Laravel 5 package for the [Wordpress JSON REST API](https://github.com/WP-API/WP-API)

Install
-------

[](#install)

Simply add the following line to your `composer.json` and run install/update:

```
"threesquared/laravel-wp-api": "~2.0"

```

Configuration
-------------

[](#configuration)

You will need to add the service provider and optionally the facade alias to your `config/app.php`:

```
'providers' => array(
  Threesquared\LaravelWpApi\LaravelWpApiServiceProvider::class
)

'aliases' => array(
  'WpApi' => Threesquared\LaravelWpApi\Facades\WpApi::class
),
```

And publish the package config files to configure the location of your Wordpress install:

```
php artisan vendor:publish

```

### Usage

[](#usage)

The package provides a simplified interface to some of the existing api methods documented [here](http://wp-api.org/). You can either use the Facade provided or inject the `Threesquared\LaravelWpApi\WpApi` class.

#### Posts

[](#posts)

```
WpApi::posts($page);
```

#### Pages

[](#pages)

```
WpApi::pages($page);
```

#### Post

[](#post)

```
WpApi::post($slug);
```

```
WpApi::postId($id);
```

#### Categories

[](#categories)

```
WpApi::categories();
```

#### Tags

[](#tags)

```
WpApi::tags();
```

#### Category posts

[](#category-posts)

```
WpApi::categoryPosts($slug, $page);
```

#### Author posts

[](#author-posts)

```
WpApi::authorPosts($slug, $page);
```

#### Tag posts

[](#tag-posts)

```
WpApi::tagPosts($slug, $page);
```

#### Search

[](#search)

```
WpApi::search($query, $page);
```

#### Archive

[](#archive)

```
WpApi::archive($year, $month, $page);
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 77.8% 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 ~68 days

Total

5

Last Release

3687d ago

Major Versions

1.1.0 → 2.02016-01-22

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

2.1.0PHP &gt;=5.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/27ef1eafa7cfeb2a4d815ff6329e472795ab626f27504a1467f0df43fded7d7e?d=identicon)[Ben-Speakman](/maintainers/Ben-Speakman)

---

Top Contributors

[![threesquared](https://avatars.githubusercontent.com/u/892142?v=4)](https://github.com/threesquared "threesquared (7 commits)")[![AndrewFeeney](https://avatars.githubusercontent.com/u/13425337?v=4)](https://github.com/AndrewFeeney "AndrewFeeney (1 commits)")[![rafaelcneves](https://avatars.githubusercontent.com/u/421754?v=4)](https://github.com/rafaelcneves "rafaelcneves (1 commits)")

---

Tags

laravellaravel-5-packagewordpresswp-apiapilaravelwordpressrestpackage

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/threesquared-laravel-wp-api/health.svg)

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

###  Alternatives

[pixelpeter/laravel5-woocommerce-api-client

Laravel 5 wrapper for the Woocommerce REST API

125103.4k](/packages/pixelpeter-laravel5-woocommerce-api-client)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[cybercog/youtrack-rest-php

YouTrack REST API PHP Client.

37149.2k3](/packages/cybercog-youtrack-rest-php)[illuminatech/data-provider

Allows easy build for DB queries from API requests

4413.3k](/packages/illuminatech-data-provider)[dreamfactory/df-core

DreamFactory(tm) Core Components

1651.7k20](/packages/dreamfactory-df-core)[laragear/api-manager

Manage multiple REST servers to make requests in few lines and fluently.

161.8k](/packages/laragear-api-manager)

PHPackages © 2026

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