PHPackages                             three-mammals/pushy - 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. three-mammals/pushy

ActiveWordpress-plugin

three-mammals/pushy
===================

A plugin to make Wordpress headless.

0.0.16(6y ago)1536MITPHPCI failing

Since Feb 25Pushed 6y ago2 watchersCompare

[ Source](https://github.com/ThreeMammals/pushy)[ Packagist](https://packagist.org/packages/three-mammals/pushy)[ RSS](/packages/three-mammals-pushy/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (6)Versions (17)Used By (0)

Pushy
=====

[](#pushy)

What is it?
-----------

[](#what-is-it)

Pushy is an open source Wordpress plugin that pushes data out of wordpress in the form of events. This enables using Wordpress as a headless CMS. That is rather than user requests for content hitting Wordpress for rendering etc you can create your own UI using whatever technology you want.

This pattern is proving somewhat popular for legacy systems like Wordpress and Magento. These systems provide amazing features but their API offerings are difficult to use if you wanted to use something like React (Native) &amp; GraphQL.

This pattern is also useful if you need to scale beyond what Wordpress is capable of and have an optimised read model.

This is basically meant to be souped up webhooks.

[![Latest Stable Version](https://camo.githubusercontent.com/3f70b8b6405a010c6a3e23dd147d9febb23fb8b0fd872aac1fc2eeff48c3a16d/68747470733a2f2f706f7365722e707567782e6f72672f74687265652d6d616d6d616c732f70757368792f762f737461626c65)](https://packagist.org/packages/three-mammals/pushy)[![Total Downloads](https://camo.githubusercontent.com/b94bd37db7c3c61348d1dc77ab7d2f688391df6a185b8cac2a68f2beda9b2533/68747470733a2f2f706f7365722e707567782e6f72672f74687265652d6d616d6d616c732f70757368792f646f776e6c6f616473)](https://packagist.org/packages/three-mammals/pushy)[![License](https://camo.githubusercontent.com/1c9db68997c1a8d74ad6614a5ed3754d27b62b0be67eb0b8874aa39c71e92612/68747470733a2f2f706f7365722e707567782e6f72672f74687265652d6d616d6d616c732f70757368792f6c6963656e7365)](https://packagist.org/packages/three-mammals/pushy)

Why?
----

[](#why)

My work want to make Wordpress headless but we don't really have time to work on it. I thought it was an interesting idea so started this to see how it might work in terms of pushing data out.

I am not a PHP developer really so please forgive anything that sucks.

What can I push the messages to?
--------------------------------

[](#what-can-i-push-the-messages-to)

At the moment you can push the messages to disk using the FilePublisher and AWS SNS using the SNSPublisher. The FilePublisher is only meant to be used for manual testing and messing around.

After you install Pushy as a wordpress plugin you will get a section added under options called `Pushy Options`. Under this you can set if you want to use the FilePublisher or SNSPublisher. The location is either the root path where you want the FilePublisher to write the messages e.g. `/var/www/html/data/` or the SNS topic arn prefix e.g. `arn:aws:sns:eu-west-1:940731442544:`. This is because Pushy will publish an event with a name to this location e.g. SNS it will publish to `arn:aws:sns:eu-west-1:940731442544:PostUpdated` when a post is updated or to `/var/www/html/data/PostUpdated-35c48bc8-348d-11e9-8e72-0242ac120003.json` using the FilePublisher. Note the guid here is just the messages id for uniqueness.

What events are published?
--------------------------

[](#what-events-are-published)

- action save\_post post\_type post and post\_status publish publishes PostUpdated event
- action save\_post post\_type post and post\_status private publishes PostUpdated event
- action save\_post post\_type post and post\_status trash publishes PostTrashed event
- action save\_post post\_type revision publishes Revision event
- action save\_post post\_type post and post\_status draft publishes PostDraft event
- action save\_post post\_type post and post\_status auto-draft publishes PostDraft event
- action save\_post post\_type page and post\_status auto-draft publishes PageDraft event
- action save\_post post\_type page and post\_status draft publishes PageDraft event
- action save\_post post\_type page and post\_status publish publishes PageUpdated event
- action save\_post post\_type nav\_menu\_item and post\_status publish publishes MenuItemPublished event
- action save\_post post\_type post and post\_status future publishes FuturePostUpdated event
- action save\_post post\_type page and post\_status future publishes FuturePageUpdated event
- action untrash\_post publishes PostRestored event
- action delete\_post publishes PostDeleted event
- action edit\_category, delete\_category, create\_category publishes CategoriesUpdated event
- action wp\_update\_nav\_menu publishes MenuUpdated event
- action wp\_delete\_nav\_menu publishes MenuDeleted event
- filter wp\_handle\_upload\_prefilter publishes MediaUploaded event
- action add\_attachment publishes AttachmentUploaded event
- action delete\_attachment publishes AttachmentDeleted event
- action update\_attachment publishes AttachmentUpdated event
- action publish\_page publishes PagePublished event
- action updated\_postmeta publishes PostMetaUpdated event
- action edit\_post\_tag, delete\_post\_tag, create\_post\_tag publishes TagsUpdated event

These events all contain the data serialised as json that is passed into the hook by Wordpress. Some of them make additonal data fetches.

Terraform
---------

[](#terraform)

### AWS

[](#aws)

I have setup a simple terraform script to deploy the required SNS topics. A good knowledge of terraform is required to use this because you will probably want to make changes. I have the credentials setup in a normal way locally for AWS cli and I have some helper scripts to execute terraform in from docker.

The AWS terraform provider is set up in a very simple way and you might want to change this :)

From root call `./infrastructure/terraform/aws/plan.sh` to create a plan. From root call `./infrastructure/terraform/aws/apply.sh` to apply the plan and create the resources in AWS. From root call `./infrastructure/terraform/aws/apply.sh` to destroy created resources.

Whats next?
-----------

[](#whats-next)

Generally make everything better. At the moment not all hooks that are relavent are supported. Maybe we should fetch more data when doing say PostUpdated? Can we be more accurate with save PostCreated rather than just PostUpdated etc. Can we target specific post types better. Can we do better with media?

List of actions we can use [here](https://adambrown.info/p/wp_hooks/hook/actions)

How do I run the tests
----------------------

[](#how-do-i-run-the-tests)

I do `./vendor/bin/phpunit --bootstrap tests/autoload.php tests/`

Useful composer stuff I forget
------------------------------

[](#useful-composer-stuff-i-forget)

`php composer.phar require package-name``php composer.phar install`

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

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

Recently: every ~41 days

Total

16

Last Release

2406d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ed1fd6514b4b6e79e331969e6166ec15aa11ac8ec3b01b2affff333199dfe9c?d=identicon)[ThreeMammals](/maintainers/ThreeMammals)

---

Top Contributors

[![TomPallister](https://avatars.githubusercontent.com/u/5716716?v=4)](https://github.com/TomPallister "TomPallister (5 commits)")

---

Tags

headless-cmsphpwordpresswordpress-plugin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/three-mammals-pushy/health.svg)

```
[![Health](https://phpackages.com/badges/three-mammals-pushy/health.svg)](https://phpackages.com/packages/three-mammals-pushy)
```

###  Alternatives

[magento/community-edition

Magento 2 (Open Source)

12.1k52.1k10](/packages/magento-community-edition)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[vonage/jwt

A standalone package for creating JWTs for Vonage APIs

424.1M4](/packages/vonage-jwt)[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)

PHPackages © 2026

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