# Problem Using Valet+ for local development

**URL:** <https://forum.getkirby.com/t/problem-using-valet-for-local-development/10323>\
**Category:** Questions\
**Tags:** v2\
**Created:** [April 30, 2018, 1:29pm UTC](https://forum.getkirby.com/t/problem-using-valet-for-local-development/10323 "2018-04-30T13:29:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [April 30, 2018, 1:29pm UTC](https://forum.getkirby.com/t/problem-using-valet-for-local-development/10323/1 "2018-04-30T13:29:01Z")

</div>

I just switched my local dev platform to [Valet+](https://github.com/weprovide/valet-plus) from the official [Laravel Valet](https://laravel.com/docs/5.6/valet). The reason being Valet+ adds a bunch of features that Valet does not have (Ability to switch PHP version, Mailhog, command line DB features, and more).

Problem is, Kirby for some reason no longer detects the server name, so all your URLs will be wrong. This worked fine with the official Valet.

To get it going, you need to set the URL for local test server in your `config.php`. This is whatever you set with the `valet link` command.

```auto
c::set('url', 'http://yourtestname.test');  

```

You will need to set it back to the default in your [live domain config](https://getkirby.com/docs/developer-guide/configuration/options#multi-environment-setup):

```auto
c::set('url', false);

```

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 30, 2018, 1:35pm UTC](https://forum.getkirby.com/t/problem-using-valet-for-local-development/10323/2 "2018-04-30T13:35:52Z")

</div>

Instead of setting it to false later in the live domain config, it would make more sense to use a local config file for setting the domain, config.yourtestname.test.php

Edit: Unless that isn’t possible because Kirby doesn’t recognize it in the first place…

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [April 30, 2018, 1:42pm UTC](https://forum.getkirby.com/t/problem-using-valet-for-local-development/10323/3 "2018-04-30T13:42:03Z")

</div>

> [@texnixe](#):
>
> Edit: Unless that isn’t possible because Kirby doesn’t recognize it in the first place…

I just tested that. config for local doesn’t work, you need to set it in `config.php` then unset in the other configs you have.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 30, 2018, 1:43pm UTC](https://forum.getkirby.com/t/problem-using-valet-for-local-development/10323/4 "2018-04-30T13:43:05Z")

</div>

Too bad…😞 (and some more chars)

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [April 30, 2018, 1:48pm UTC](https://forum.getkirby.com/t/problem-using-valet-for-local-development/10323/5 "2018-04-30T13:48:15Z")

</div>

Yup. But workable. It’s strange because it’s built on top of the official Valet, they have simply extended its features.

I tried to verify it with `$domain = server::get('server_name');` but it comes up empty. Something peculiar in the way Valet+ is setup I imagine.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 30, 2018, 1:51pm UTC](https://forum.getkirby.com/t/problem-using-valet-for-local-development/10323/6 "2018-04-30T13:51:19Z")

</div>

Well, after a short excursion with Valet, I’m currently back to MAMP anyway.

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [April 30, 2018, 2:00pm UTC](https://forum.getkirby.com/t/problem-using-valet-for-local-development/10323/7 "2018-04-30T14:00:24Z")

</div>

I used to use MAMP, but got stuck at one point when I needed to run something that was beyond what was built into mamp (at that time). Then i built my own server as a seperate computer. Then I rolled my own with VirtualBox to free up a plug socket… then vagrant (Homesetead & Scotchbox)… then Valet.

I like Valet because it happily coexists with Vagrant and it doesn’t cost anything.

It’s always a never ending search for the perfect setup… 🙂

Out of curiosity, what made you go back to mamp?

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [April 30, 2018, 2:07pm UTC](https://forum.getkirby.com/t/problem-using-valet-for-local-development/10323/8 "2018-04-30T14:07:16Z")

</div>

Oh boy. It gets worse. Kirby doesn’t like Valet+. My sites running but clicking the main menu links only shows the home page, even though the URL in the address bar is changing. I guess the problem runs deeper then it simply not seeing the server name.

Back to vanilla Valet…

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 30, 2018, 2:15pm UTC](https://forum.getkirby.com/t/problem-using-valet-for-local-development/10323/9 "2018-04-30T14:15:35Z")

</div>

Well, since MAMP works for me most of the time, I don’t really see a reason to change a running system. Maybe it’s very subjective, but I found it easier to set up new projects and change PHP version with Mamp then with Valet. Also, for the occasional MySQL stuff (although MySQL is where MAMP has several times failed me). And I don’t really want to waste time with this never ending quest for the right tool, rather invest it in developing stuff.

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:28pm UTC](https://forum.getkirby.com/t/problem-using-valet-for-local-development/10323/10 "2025-02-06T17:28:21Z")

</div>

Archived on February 6, 2025, 5:28pm UTC


