PHPackages                             tradzero/wp\_rest\_laravel - 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. tradzero/wp\_rest\_laravel

ActiveLibrary

tradzero/wp\_rest\_laravel
==========================

0.03(8y ago)3541GPLv3PHP

Since Jul 26Pushed 8y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

WPREST
======

[](#wprest)

laravel package for easy use wordpress rest api, only provide post, category create and update at this version.

Prepare
=======

[](#prepare)

WP REST API V2
--------------

[](#wp-rest-api-v2)

All REST API provided by WP REST API V2, if your wordpress version more than 4.7, you can skip this, because it's included in wordpress 4.7, if not, you should install it [WP REST API V2 plugin](https://wordpress.org/plugins/rest-api/)

JWT Authentication for WP-API
-----------------------------

[](#jwt-authentication-for-wp-api)

Wordpress don't provide a easy way to authenticate api, so i decide use JWT plugin to authenticate.

Here is [link](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/)

### Usage

[](#usage)

when you installed, you need to [configure](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/#description) and enable it.

Install
=======

[](#install)

`$ composer require tradzero/wp_rest_laravel:dev-master -vvv`

Edit `/pathto/config/app.php`

```
'providers' => [
    // Other service providers...
    Tradzero\WPREST\WPRESTServiceProvider::class,
],
```

You can also add alias in

```
'aliases' => [
    'WPREST' => Tradzero\WPREST\Facade::class,
]
```

Publish config file

```
$ php artisan vendor:publish --provider=Tradzero\WPREST\WPRESTServiceProvider
```

Configure `wordpress.php`
enter your wordpress endpoint and account infomation.

Usage
=====

[](#usage-1)

```
use Tradzero\WPREST\Resources\Post;
use Tradzero\WPREST\Resources\Category;
use WPREST;

$post = new Post();
$post->setTitle('hello world');
$post->setContent('Its post created using WP REST API');

WPREST::createPost($post);

$post->setId('XX');
WPREST::updatePost($post);

$category = new Category;
$category->setName('category 1');
WPREST::findCategoryOrCreate($category);
// or
WPREST::createCategory($category);
$post->setCategories(array($category));
WPREST::createPost($post);
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

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 ~78 days

Total

3

Last Release

3053d ago

### Community

Maintainers

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

---

Top Contributors

[![tradzero](https://avatars.githubusercontent.com/u/13845447?v=4)](https://github.com/tradzero "tradzero (19 commits)")

---

Tags

composer-packageslaravelwordpress

### Embed Badge

![Health badge](/badges/tradzero-wp-rest-laravel/health.svg)

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

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k20](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)

PHPackages © 2026

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