Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

AlexanderKim's avatar

Grunt is very slow on a homestead (virtualbox + vagrant)

It takes ages for grunt to run my tasks under homestead. I already swapped to NFS - but it's still so slow. Is there any workaround to make grunt tasks faster with Homestead?

Grunt watch shows 0.3 ms, but it has like 10 seconds delay before detecting file changes....

0 likes
8 replies
austenc's avatar

Are you calling grunt watch from inside the vm, or from outside (on your host machine)?

anchour's avatar
anchour
Best Answer
Level 4

Homestead/Vagrant tends to be pretty slow running on a VM like that. Run it from your host machine. Should work just fine.

4 likes
AlexanderKim's avatar

On my host machine, yeah, it works just fine, but i won't install nodejs etc. on my home machine, that's why i am using virtualbox/vagrant/homestead.

So there's no way to speed it up?

bashy's avatar

Slow probably just means it's backed up on CPU cycles. Do you only have 1 core enabled for the VM? Do you have a good CPU in the host computer? SSD/HDD?

austenc's avatar

If you install grunt globally on your host machine, it should use the dependencies you've installed into your project folder from within the vm. This is what I recommend doing (as @mrobit also said) since then file change detection can all happen on your host machine.

AlexanderKim's avatar

@mrobit, i gave up and installed nodejs/gulp locally. Even gulp on homestead gave me a 10 - 15 seconds delay after editing.

1 like
Andreyco's avatar

@heihachi88 I am experiencing this problem as well. Have you solved it or just settled on installing NodeJS on host machine? I am thinking about Homestead for VMWare (which is new).

I totally understand why you didn't want to install it on host machine. By installing whole Homestead/Vagrant box loses point. I just want to keep host machine clean and do whatever on VM and just replace it when something goes wrong.

Please or to participate in this conversation.