Skip to content
On this page


There is a new plugin for DDEV called viteserve by torenware. It runs vite in the background and has support for package managers npm, yarn and pnpm (default).

You can configure it (after installation) via .ddev/.env, here is an example for having vite config in a subfolder. If you want to use the project root, use VITE_PROJECT_DIR=..

# start vite
# end vite

Vite integration differs by CMS, each CMS has their own approach. Some use a combination of a special NodeJS vite plugin + PHP code, e.g. Laravel. Some vite as it is and use PHP integration for including the vite client scripts accordingly.

See examples here:

More to come!

Technical background

The challenge in terms of DDEV is that you should acknowledge that DDEV runs it own reverse proxy and takes care of HTTPS. Vite is just merely waiting in the DDEV container and needs to respond to port 5173 and accept any incoming data traffic. Vite does not(!) need to run https itself.

DDEV then needs to expose the port 5173 via https to the outside, this is done in docker-compose.viteserve.yaml.

An important first check is that vite is accessible via after you run ddev vite-serve start.

Afterwards your CMS / PHP frameworks needs to be configured accordingly, see above. The official docs for this can be found here:

Full documentation

See full documentation for DDEV viteserve here:

Connect with the community 🤗

There are dedicated CMS channels on DDEV discord, e.g. for Laravel, WordPress, typo3, CraftCMS, Drupal, etc.!