PHPackages                             rickysu/php-livereload - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. rickysu/php-livereload

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rickysu/php-livereload
======================

a livereload server implement by php

v0.1.2(9y ago)753.9k9[2 issues](https://github.com/RickySu/php-livereload/issues)[1 PRs](https://github.com/RickySu/php-livereload/pulls)MITPHP

Since Mar 5Pushed 9y ago2 watchersCompare

[ Source](https://github.com/RickySu/php-livereload)[ Packagist](https://packagist.org/packages/rickysu/php-livereload)[ RSS](/packages/rickysu-php-livereload/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

PHP Livereload
==============

[](#php-livereload)

[![Build Status](https://camo.githubusercontent.com/cb9835f3e3930fbd5f5754e7ccc171a46ec63fa4ead1acd89fac214319c41817/68747470733a2f2f7472617669732d63692e6f72672f5269636b7953752f7068702d6c69766572656c6f61642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/RickySu/php-livereload)[![Coverage Status](https://camo.githubusercontent.com/a48d65bafa78146c6d780d163d04e33ba82cb50ef9b006cf6d9dde0d9b47db87/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f5269636b7953752f7068702d6c69766572656c6f61642f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/RickySu/php-livereload?branch=master)

php-livereload is a livereload server written in PHP.

php-livereload uses [livereload.js](https://github.com/livereload/livereload-js) -- a JavaScript file implementing the client side of the LiveReload protocol.

Install
-------

[](#install)

Install php-livereload from [composer](http://getcomposer.org).

```
{
    "require": {
        "rickysu/php-livereload": "dev-master"
    }
}
```

Get the command-line php-livereload

```
$ curl -O https://raw.github.com/RickySu/php-livereload/master/dist/reload.phar
$ chmod +x reload.phar
$ sudo mv reload.phar /usr/bin

```

Install [LiveReload Safari/Chrome/Firefox extension](http://feedback.livereload.com/knowledgebase/articles/86242-how-do-i-install-and-use-the-browser-extensions-)

Tests
-----

[](#tests)

To run the test suite, you need install the dependencies via composer, then run PHPUnit.

```
$ composer install
$ phpunit

```

Using php-livereload
--------------------

[](#using-php-livereload)

define a livereload.json in your project root.

livereload.json

```
{
    "period": 1,
    "watch": {
        "web/css/":   "*.css",
        "web/js/":    "*.js",
        "web/img/":   "\\.png|gif|jpg$"
    }
}
```

- period: monitor file changes every 1 second.
- watch: file and folder you want to watch

#### Initialize a default livereload.json file.

[](#initialize-a-default-livereloadjson-file)

```
$ php bin/reload livereload:init

```

#### Running Server.

[](#running-server)

```
$ php bin/reload server:run

```

#### Rolling Your Own Live Reload

[](#rolling-your-own-live-reload)

If you would like to trigger the live reload server yourself, simply POST files to the URL: `http://localhost:35729/changed`. Or if you rather roll your own live reload implementation use the following example:

```
# notify a single change
curl http://localhost:35729/changed?files=style.css

# notify using a longer path
curl http://localhost:35729/changed?files=js/app.js

# notify multiple changes, comma or space delimited
curl http://localhost:35729/changed?files=index.html,style.css,docs/docco.css

```

Or you can bulk the information into a POST request, with body as a JSON array of files.

```
curl -X POST http://localhost:35729/changed -d '{ "files": ["style.css", "app.js"] }'

# from a JSON file
node -pe 'JSON.stringify({ files: ["some.css", "files.css"] })' > files.json
curl -X POST -d @files.json http://localhost:35729

```

License
-------

[](#license)

MIT, see LICENSE.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community11

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

Total

3

Last Release

3410d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8440573e58d15491de4e757877d06ef061da110763cd2f035ba8344b8314b10d?d=identicon)[rickysu](/maintainers/rickysu)

---

Top Contributors

[![RickySu](https://avatars.githubusercontent.com/u/248728?v=4)](https://github.com/RickySu "RickySu (40 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rickysu-php-livereload/health.svg)

```
[![Health](https://phpackages.com/badges/rickysu-php-livereload/health.svg)](https://phpackages.com/packages/rickysu-php-livereload)
```

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[coenjacobs/mozart

Composes all dependencies as a package inside a WordPress plugin

4723.6M20](/packages/coenjacobs-mozart)[illuminate/session

The Illuminate Session package.

9937.4M753](/packages/illuminate-session)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

96374.6k23](/packages/friendsoftypo3-content-blocks)[shyim/danger-php

Port of danger to PHP

8544.9k](/packages/shyim-danger-php)

PHPackages © 2026

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