PHPackages                             typisttech/sunny - 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. [Security](/categories/security)
4. /
5. typisttech/sunny

AbandonedArchivedLibrary[Security](/categories/security)

typisttech/sunny
================

Automatically purge CloudFlare cache, including cache everything rules.

2.5.0(8y ago)3573[6 PRs](https://github.com/typisttech/sunny/pulls)GPL-2.0+PHPPHP ^7.0

Since May 5Pushed 2y ago3 watchersCompare

[ Source](https://github.com/typisttech/sunny)[ Packagist](https://packagist.org/packages/typisttech/sunny)[ Docs](https://github.com/TypistTech/sunny)[ RSS](/packages/typisttech-sunny/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (8)Dependencies (13)Versions (17)Used By (0)

Sunny
=====

[](#sunny)

[![WordPress plugin](https://camo.githubusercontent.com/525802d03be070867209b5884e7d2c68ce4b80a1139697e63fa6976e68b12f25/68747470733a2f2f696d672e736869656c64732e696f2f776f726470726573732f706c7567696e2f762f73756e6e792e737667)](https://wordpress.org/plugins/sunny/)[![WordPress](https://camo.githubusercontent.com/efe61fff2f8d04cf95bd1e6c0f4931ad9629ef4108e959839e2be28268f46281/68747470733a2f2f696d672e736869656c64732e696f2f776f726470726573732f706c7567696e2f64742f73756e6e792e737667)](https://wordpress.org/plugins/sunny/)[![WordPress rating](https://camo.githubusercontent.com/d713f52607a2f9dec14ef7f68ce5295215ac8c9e2987cd77177206ca3a606bca/68747470733a2f2f696d672e736869656c64732e696f2f776f726470726573732f706c7567696e2f722f73756e6e792e737667)](https://wordpress.org/plugins/sunny/)[![WordPress](https://camo.githubusercontent.com/9f19c14dfc126dcf7b88ab9c313fad93e4471d06d6784da51adbe5aa45806f75/68747470733a2f2f696d672e736869656c64732e696f2f776f726470726573732f762f73756e6e792e737667)](https://wordpress.org/plugins/sunny/)[![Build Status](https://camo.githubusercontent.com/0ddd47d624fa64e97682f234d87a515ff178496c5acf0940ded883c76e6765c5/68747470733a2f2f7472617669732d63692e6f72672f547970697374546563682f73756e6e792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/TypistTech/sunny)[![codecov](https://camo.githubusercontent.com/9cb2d1cd4d20a215e6dd12a30cfcd1f7127648db3babd463bad394934132fb83/68747470733a2f2f636f6465636f762e696f2f67682f547970697374546563682f73756e6e792f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/TypistTech/sunny)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/db82308577952295003b6dd47ab8a1aa8daf3ac50ca68851173d16120104b5da/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f547970697374546563682f73756e6e792f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/TypistTech/sunny/?branch=master)[![PHP Versions Tested](https://camo.githubusercontent.com/dfc0d44c4166fe11d5bfc126b8298269d96b966f8ec13ddbe930034f1d528967/687474703a2f2f7068702d6579652e636f6d2f62616467652f747970697374746563682f73756e6e792f7465737465642e737667)](https://travis-ci.org/TypistTech/sunny)[![StyleCI](https://camo.githubusercontent.com/91db2e055c08c9b956b41bf3c5b9760a431a7182ba3281c92aa40bf474081941/68747470733a2f2f7374796c6563692e696f2f7265706f732f32313537363432332f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/21576423)[![Dependency Status](https://camo.githubusercontent.com/b34baf5ab58dc2b53f81278741f13131ae91609820056213f012a5819b9d1b5c/68747470733a2f2f67656d6e617369756d2e636f6d2f6261646765732f6769746875622e636f6d2f547970697374546563682f73756e6e792e737667)](https://gemnasium.com/github.com/TypistTech/sunny)[![License](https://camo.githubusercontent.com/0d55339c86922a9d5eae2573c958a69823adbd91c513a592b608b563a058a57f/68747470733a2f2f706f7365722e707567782e6f72672f747970697374746563682f73756e6e792f6c6963656e7365)](https://packagist.org/packages/typisttech/sunny)[![Donate via PayPal](https://camo.githubusercontent.com/b57c445af971e3e99c2d0ccdbf4fa7faa4358ba27fecc8f68459b30289f82eda/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d626c75652e737667)](https://www.typist.tech/donate/sunny/)[![Hire Typist Tech](https://camo.githubusercontent.com/e392a964bbdc0c32d95825bbc8253027387bcb9b021176d807d22ac75d86f308/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f486972652d547970697374253230546563682d6666363962342e737667)](https://www.typist.tech/contact/)

Automatically purge Cloudflare cache, including cache everything rules.

- [Installation Instructions](#installation-instructions)
    - [Via Manually Upload](#via-manually-upload)
    - [Via WP CLI](#via-wp-cli)
- [Developing](#developing)
- [Build from Source](#build-from-source)
- [Extending Sunny](#extending-sunny)
- [Branches](#branches)
    - [Master](#master)
    - [Nightly](#nightly)
- [Support!](#support)
    - [Donate via PayPal \*](#donate-via-paypal-)
    - [Why don't you hire me?](#why-dont-you-hire-me)
    - [Want to help in other way? Want to be a sponsor?](#want-to-help-in-other-way-want-to-be-a-sponsor)
- [Running the Tests](#running-the-tests)
- [Feedback](#feedback)
- [Change log](#change-log)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

This repository is a development version of [Sunny](https://wordpress.org/plugins/sunny/) intended to facilitate communication with developers. It is not stable and not intended for installation on production sites.

Bug reports and pull requests are welcome.

If you are not a developer or you'd like to receive the stable release version and automatic updates, install it via [WordPress.org](https://wordpress.org/plugins/sunny/) instead.

Installation Instructions
-------------------------

[](#installation-instructions)

If you are not a developer or you'd like to receive the stable release version and automatic updates, install it via [WordPress.org](https://wordpress.org/plugins/sunny/) instead.

The `master` branch is not installable. Use the `nightly` branch instead. See [branches](#branches).

### Via Manually Upload

[](#via-manually-upload)

1. Download the built archive from [nightly branch](https://github.com/TypistTech/sunny/archive/nightly.zip)
2. Unzip it
3. Upload it to `wp-content/plugins/`
4. Go to the WordPress plugin menu and activate it

### Via WP CLI

[](#via-wp-cli)

1. `$ wp plugin install https://github.com/TypistTech/sunny/archive/nightly.zip --activate`

Developing
----------

[](#developing)

Before start hacking, you need both `composer ` and `yarn` installed. See:

- [getcomposer.org](https://getcomposer.org/doc/00-intro.md)
- [yarnpkg.com](https://yarnpkg.com/en/docs/install)

To setup a developer workable version you should run these commands:

```
$ composer create-project --keep-vcs --no-install typisttech/sunny:dev-master
$ cd sunny
$ composer install
```

Build from Source
-----------------

[](#build-from-source)

This command build the plugin into `release/sunny.zip`.

```
$ composer build
```

Note: You need both `composer ` and `yarn` installed.

Extending Sunny
---------------

[](#extending-sunny)

`Targets` and `Post related urls` are filterable by `StrategyInterface`, `sunny_targets` and `sunny_post_related_urls`. See examples on [Sunny Purge Extra URLs Example](https://github.com/TypistTech/sunny-purge-extra-urls-example).

Under the hood, Sunny uses [WP Contained Hook](https://github.com/TypistTech/wp-contained-hook) and [league/container](https://container.thephpleague.com/). Sunny exposes its `container` via WordPress actions `sunny_register` and `sunny_boot` in [Laravel](https://laravel.com/docs/master/providers) style.

Within the `sunny_register` action, you should only bind things into the container. You should never attempt to register any hooks, actions, filters or any other piece of functionality within `sunny_register` action. Otherwise, you may accidentally use an instance which has not been loaded yet.

The `sunny_boot` action is called after this plugin and all its addons have been registered, meaning you have access to all instance that have been registered by this plugin and its addons.

Branches
--------

[](#branches)

### Master

[](#master)

The `master` branch is the main branch where the source code of `HEAD` always reflects a state with the latest delivered development changes for the next release. This is where the `nightly` branch is built from. Since we built this plugin with `composer` and `grunt`, this branch is not installable.

### Nightly

[](#nightly)

The `nightly` branch is built by TravisCI whenever the `master` branch is updated. Anything in the `nightly` branch is installable. See [installation instructions](#installation-instructions).

Support!
--------

[](#support)

### Donate via PayPal [![Donate via PayPal](https://camo.githubusercontent.com/b57c445af971e3e99c2d0ccdbf4fa7faa4358ba27fecc8f68459b30289f82eda/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d626c75652e737667)](https://www.typist.tech/donate/sunny/)

[](#donate-via-paypal-)

Love Sunny? Help me maintain Sunny, a [donation here](https://www.typist.tech/donate/sunny/) can help with it.

### Why don't you hire me?

[](#why-dont-you-hire-me)

Ready to take freelance WordPress jobs. Contact me via the contact form [here](https://www.typist.tech/contact/) or, via email

### Want to help in other way? Want to be a sponsor?

[](#want-to-help-in-other-way-want-to-be-a-sponsor)

Contact: [Tang Rufus](mailto:tangrufus@gmail.com)

Running the Tests
-----------------

[](#running-the-tests)

[Sunny](https://github.com/TypistTech/sunny) run tests on [Codeception](http://codeception.com/) and relies [wp-browser](https://github.com/lucatume/wp-browser) to provide WordPress integration. Before testing, you have to install WordPress locally and add [\*.suite.yml](http://codeception.com/docs/reference/Configuration) files.

See [\*.suite.example.yml](/tests) for a [Varying Vagrant Vagrants](https://varyingvagrantvagrants.org/) configuration example.

Actually run the tests:

```
$ composer test
```

We also test all PHP files against [PSR-2: Coding Style Guide](http://www.php-fig.org/psr/psr-2/) and part of the [WordPress coding standard](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards).

Check the code style with `$ composer check-style` and fix it with `$ composer fix-style`.

Feedback
--------

[](#feedback)

**Please provide feedback!** We want to make this library useful in as many projects as possible. Please submit an [issue](https://github.com/TypistTech/sunny/issues/new) and point out what you do and don't like, or fork the project and make suggestions. **No issue is too small.**

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](./CODE_OF_CONDUCT.md) for details.

Credits
-------

[](#credits)

[Sunny](https://github.com/TypistTech/sunny) is a [Typist Tech](https://www.typist.tech) project and maintained by [Tang Rufus](https://twitter.com/Tangrufus), freelance developer for [hire](https://www.typist.tech/contact/).

Full list of contributors can be found [here](https://github.com/TypistTech/sunny/graphs/contributors).

License
-------

[](#license)

[Sunny](https://github.com/TypistTech/sunny) is licensed under the GPLv2 (or later) from the [Free Software Foundation](http://www.fsf.org/). Please see [License File](LICENSE) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

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

Recently: every ~58 days

Total

9

Last Release

3048d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c1b05c8ed4ea3f68173555264d0226d5faeb7f315ed9df91890c351ef576ce72?d=identicon)[TangRufus](/maintainers/TangRufus)

---

Top Contributors

[![tangrufus](https://avatars.githubusercontent.com/u/2259834?v=4)](https://github.com/tangrufus "tangrufus (366 commits)")

---

Tags

cache-controlcloudflarephpwordpresswordpress-pluginwordpresssecuritycloudflarewpfirewall

### Embed Badge

![Health badge](/badges/typisttech-sunny/health.svg)

```
[![Health](https://phpackages.com/badges/typisttech-sunny/health.svg)](https://phpackages.com/packages/typisttech-sunny)
```

###  Alternatives

[brain/nonces

OOP package for WordPress to deal with nonces.

26227.1k1](/packages/brain-nonces)[itinerisltd/disallow-pwned-passwords

Disallow WordPress and WooCommerce users using pwned passwords.

281.8k](/packages/itinerisltd-disallow-pwned-passwords)

PHPackages © 2026

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