PHPackages                             jeffochoa/laravel-wordpress-client - 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. jeffochoa/laravel-wordpress-client

ActiveLibrary

jeffochoa/laravel-wordpress-client
==================================

A small client to request data from a wordpress project using the built-in JSON api.

27127[1 issues](https://github.com/jeffochoa/laravel-wordpress-client/issues)PHP

Since Dec 12Pushed 8y ago2 watchersCompare

[ Source](https://github.com/jeffochoa/laravel-wordpress-client)[ Packagist](https://packagist.org/packages/jeffochoa/laravel-wordpress-client)[ RSS](/packages/jeffochoa-laravel-wordpress-client/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Wordpress json-api client for Laravel 5.5.\*
============================================

[](#wordpress-json-api-client-for-laravel-55)

A small client to request data from a wordpress project using the built-in JSON api.

About
-----

[](#about)

This package uses [kitetail/zttp](https://github.com/kitetail/zttp) which is a lightweight [Guzzle](https://github.com/guzzle/guzzle) client.

Install
-------

[](#install)

```
$ composer require jeffochoa/laravel-wordpress-client
```

Config
------

[](#config)

Publish the config file:

```
$ php artisan vendor:publish --laravel-wordpress
```

Add your wordpress site API endpoint to the `.env` file

```
WP_API_URL=

```

How to use?
-----------

[](#how-to-use)

Here you have a list of the available methods:

```
$wordpress = new WordpressClient();

$response = $wordpress->categories();
$response = $wordpress->media();
$response = $wordpress->pages();
$response = $wordpress->posts();
$response = $wordpress->statuses();
$response = $wordpress->tags();
$response = $wordpress->taxonomies();
$response = $wordpress->types();
$response = $wordpress->users();
```

### Using via facade accessor

[](#using-via-facade-accessor)

```
$response = Wordpress::categories();
```

### Request params

[](#request-params)

All the methods receive an array to be use as part of the query

```
$response = Wordpress::posts(['page' => 1, 'per_page' => 1]);
```

[Here](https://developer.wordpress.org/rest-api/reference/posts/#list-posts) you can get a list of the arguments that you can use on each request.

### Parsing the responses

[](#parsing-the-responses)

As an array:

```
$response = Wordpress::posts(['page' => 1, 'per_page' => 1])->json();
```

As a collection:

```
$response = Wordpress::posts(['page' => 1, 'per_page' => 1])->collection();
```

Testing
-------

[](#testing)

To run the tests you can clone this project then:

```
$ composer install
```

And finally you need to create your own `phpunit.xml` file

```
$ cp phpunit.example phpunit.xml
```

Don't forget to set the wordpress api endpoint in your `phpunit.xml` file

```

```

Contribute
==========

[](#contribute)

Pull requests and issues are welcome.

Thanks!
-------

[](#thanks)

Say hi on twitter: [@Jeffer\_8a](https://twitter.com/Jeffer_8a)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/80d5b818ba7e153fc45449cac9bf17346ac5c668a32596b454f3d5380281207e?d=identicon)[jeffer8a](/maintainers/jeffer8a)

---

Top Contributors

[![jeffochoa](https://avatars.githubusercontent.com/u/8247079?v=4)](https://github.com/jeffochoa "jeffochoa (2 commits)")[![ericlbarnes](https://avatars.githubusercontent.com/u/116662?v=4)](https://github.com/ericlbarnes "ericlbarnes (1 commits)")

### Embed Badge

![Health badge](/badges/jeffochoa-laravel-wordpress-client/health.svg)

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

PHPackages © 2026

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