PHPackages                             pstaender/silverstripe-serve - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. pstaender/silverstripe-serve

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

pstaender/silverstripe-serve
============================

Connects the PHP development server to SilverStripe

2.2.0(7y ago)013MITPHPPHP ^5.6||^7.0

Since May 19Pushed 3y agoCompare

[ Source](https://github.com/pstaender/silverstripe-serve)[ Packagist](https://packagist.org/packages/pstaender/silverstripe-serve)[ RSS](/packages/pstaender-silverstripe-serve/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (13)Used By (0)

SilverStripe Serve
==================

[](#silverstripe-serve)

A simple dev task, to start a development server for your SilverStripe app.

Getting started
---------------

[](#getting-started)

```
$ composer require silverstripe/serve
$ framework/sake dev/build flush=1
$ vendor/bin/serve
```

This will start the server at `http://localhost:8080`.

You can override the host/port:

```
$ vendor/bin/serve --host 127.0.0.1 --port 8000
```

[![](serve.gif)](serve.gif)

Including a bootstrap file
--------------------------

[](#including-a-bootstrap-file)

The bootstrap-file argument lets you include a custom PHP file after composer has been loaded (which includes Silverstripe’s Constants.php) but before main.php has been loaded.

This can be used for any number of things, but the primary use-case is to pull in any stub code &amp; config that wouldn’t normally be included by SilverStripe in the current execution session, such as test stubs.

```
$ vendor/bin/serve --bootstrap-file tests/serve-bootstrap.php
```

Using as a library
------------------

[](#using-as-a-library)

You can also use serve as a library, to start a SilverStripe server from some other tool such as a test suite:

Assuming that `BASE_PATH` is defined, you can use it like this:

```
use SilverStripe\Serve\ServerFactory;

$factory = new ServerFactory();

$server = $factory->launchServer([
    'host' => 'localhost',
    'preferredPort' => 3000,
]);

// Print the contents of the homepage
echo file_get_contents($server->getURL());

// Stop the server when you're done with it
$server->stop();
```

If `BASE_PATH` is not defined, e.g. if you are not running a SapphireTest, you can provide an alternative path to the factory constructor:

```
$factory = new ServerFactory(realpath(__DIR__ . '/../'));
```

launchServer allows the following options to be passed to it:

- **host:** The host to listen on, defaulting to 0.0.0.0
- **preferredPort:** The preferred port. If this port isn't available, the next highest one will be used
- **bootstrapFile:** The bootstrap file, as described above

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~199 days

Recently: every ~347 days

Total

11

Last Release

1650d ago

Major Versions

1.x-dev → 2.0.02017-10-09

PHP version history (4 changes)1.0.0PHP ^5.4

1.0.1PHP ^5.4||^7.0

2.0.0PHP ^5.6||^7.0

2.x-devPHP ^7.3 || ^8.0

### Community

Maintainers

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

---

Top Contributors

[![assertchris](https://avatars.githubusercontent.com/u/200609?v=4)](https://github.com/assertchris "assertchris (10 commits)")[![chillu](https://avatars.githubusercontent.com/u/111025?v=4)](https://github.com/chillu "chillu (5 commits)")[![flamerohr](https://avatars.githubusercontent.com/u/1064889?v=4)](https://github.com/flamerohr "flamerohr (2 commits)")[![dhensby](https://avatars.githubusercontent.com/u/563596?v=4)](https://github.com/dhensby "dhensby (1 commits)")[![pstaender](https://avatars.githubusercontent.com/u/140571?v=4)](https://github.com/pstaender "pstaender (1 commits)")[![robbieaverill](https://avatars.githubusercontent.com/u/5170590?v=4)](https://github.com/robbieaverill "robbieaverill (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pstaender-silverstripe-serve/health.svg)

```
[![Health](https://phpackages.com/badges/pstaender-silverstripe-serve/health.svg)](https://phpackages.com/packages/pstaender-silverstripe-serve)
```

###  Alternatives

[sammyjo20/lasso

Lasso - Asset wrangling for Laravel made simple.

355347.9k](/packages/sammyjo20-lasso)[silverstripe/serve

Connects the PHP development server to SilverStripe

22421.3k2](/packages/silverstripe-serve)[shopware/deployment-helper

Shopware deployment tools

19305.3k5](/packages/shopware-deployment-helper)[drevops/git-artifact

Package artifact from your codebase in CI and push it to a separate git repo.

2133.2k](/packages/drevops-git-artifact)

PHPackages © 2026

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