PHPackages                             quangtam/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. [API Development](/categories/api)
4. /
5. quangtam/laravel-wordpress-client

ActiveLibrary[API Development](/categories/api)

quangtam/laravel-wordpress-client
=================================

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

1.0.1(7y ago)05MITPHP

Since Oct 22Pushed 7y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (4)Versions (2)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 quangtam/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

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

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

2759d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a101ea900abe8470ad7a7450bcd2d873956a42b9f1f6b0aefdff185e35bc702?d=identicon)[quangtam](/maintainers/quangtam)

---

Top Contributors

[![quangtam](https://avatars.githubusercontent.com/u/6047178?v=4)](https://github.com/quangtam "quangtam (4 commits)")[![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/quangtam-laravel-wordpress-client/health.svg)

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

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[echolabsdev/prism

A powerful Laravel package for integrating Large Language Models (LLMs) into your applications.

2.3k388.3k10](/packages/echolabsdev-prism)[sburina/laravel-whmcs-up

WHMCS API client and user provider for Laravel

271.3k](/packages/sburina-laravel-whmcs-up)

PHPackages © 2026

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