# Local development server without using Trellis?

**URL:** <https://discourse.roots.io/t/local-development-server-without-using-trellis/14058>\
**Category:** bedrock\
**Created:** [November 5, 2018, 9:03pm UTC](https://discourse.roots.io/t/local-development-server-without-using-trellis/14058 "2018-11-05T21:03:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joshua\_Wilkeson](https://discourse.roots.io/letter_avatar_proxy/v4/letter/j/a698b9/32.png) [@Joshua\_Wilkeson](https://discourse.roots.io/u/Joshua_Wilkeson)\
**Post date:** [November 5, 2018, 9:03pm UTC](https://discourse.roots.io/t/local-development-server-without-using-trellis/14058/1 "2018-11-05T21:03:19Z")

</div>

I know php 5.4 has a built-in web server that you can launch with php -S 127.0.0.1: but it has some functionality missing and it can’t serve files in the context of this bedrock/wordpress install, I’m thinking it’s something to do with the lack of an .htaccess file. It can display the front page just fine but there’s no styling or Javascript that appears.

I’m aware there’s Trellis but if I’m on a machine that doesn’t have the ability to use virtualization, I’d like to see if there’s an alternative.

---

<div class="post-metadata">

**Author:** ![ng3](https://discourse.roots.io/user_avatar/discourse.roots.io/ng3/32/4987_2.png) [@ng3](https://discourse.roots.io/u/ng3)\
**Post date:** [November 5, 2018, 9:15pm UTC](https://discourse.roots.io/t/local-development-server-without-using-trellis/14058/2 "2018-11-05T21:15:32Z")

</div>

Would the PHP version requirement in Bedrock’s `composer.json` affect you here?

[composer.json:36](https://github.com/roots/bedrock/blob/9656d4ee07db826ceeca40000f8334590afc92d1/composer.json#L36)

```auto
 "require": {
    "php": ">=5.6",

```

---

<div class="post-metadata">

**Author:** ![ben](https://discourse.roots.io/user_avatar/discourse.roots.io/ben/32/11377_2.png) [@ben](https://discourse.roots.io/u/ben)\
**Post date:** [November 5, 2018, 9:27pm UTC](https://discourse.roots.io/t/local-development-server-without-using-trellis/14058/3 "2018-11-05T21:27:36Z")

</div>

You could use WP-CLI which uses `php -S` in the background. You’ll just need to pass the docroot like this:

> <https://github.com/roots/bedrock/issues/321#issuecomment-313539310>

---

<div class="post-metadata">

**Author:** ![Joshua\_Wilkeson](https://discourse.roots.io/letter_avatar_proxy/v4/letter/j/a698b9/32.png) [@Joshua\_Wilkeson](https://discourse.roots.io/u/Joshua_Wilkeson)\
**Post date:** [November 6, 2018, 3:44pm UTC](https://discourse.roots.io/t/local-development-server-without-using-trellis/14058/4 "2018-11-06T15:44:31Z")

</div>

I set WP\_HOME to the full url (with port), ran `composer install`, and used `wp server --docroot=web` and it works. Still wondering if the same thing would work with sage but I’ll cross that bridge when I get to it.

---

<div class="post-metadata">

**Author:** ![trainoasis](https://discourse.roots.io/user_avatar/discourse.roots.io/trainoasis/32/7768_2.png) [@trainoasis](https://discourse.roots.io/u/trainoasis)\
**Post date:** [October 14, 2019, 8:40am UTC](https://discourse.roots.io/t/local-development-server-without-using-trellis/14058/5 "2019-10-14T08:40:19Z")

</div>

Late to the party, but I would suggest [Valet](https://laravel.com/docs/5.8/valet) and [WP CLI Valet](https://github.com/aaemnnosttv/wp-cli-valet-command) to make your life easier if you want a lightweight nginx server set up in seconds. Works flawlessly.
