Documentation for Windows
#Manage Sites in Herd
If you've read the Sites introduction of the Getting Started section, you are already familiar with the concept of parked paths and linked directories – but how do you use them if you have many sites and use different technologies for them?
#Folder structure
We recommend to put all PHP based sites in your Herd directory until you reach a point where it makes sense to split them into a folder structure that makes sense for you. This could be sites per client, or if you run different technologies like Next.js, you can serve them from a different folder via npm run dev
.
This setup keeps the Site Manager clean and easy to use because you can simply unpark a directory in case that you don't work on these sites for a few weeks.
If you don't mind a long list in the Site Manager, you can also mark your most important sites as favorites to display them at the beginning of the list.
#Site Manager
You can manage your sites via the CLI, open the Site Manager from your Herd dashboard.
You can also open the Site Manager from the system try icon:
This section of the docs explains all features of the Site Manager.
The Site Manager window is divided into the list of all your sites on the left side and a site management panel for the selected site on the right side.
You can hide the site list if you are working with mainly one site but also refresh the list in case that you are making changes to your parked or linked directories via the CLI and while the Site Manager is open.
Clicking on the plus button opens the site wizard that allows you to create Laravel applications or link existing ones that are not in a parked directory.
The right side of the Sites Manager is dedicated to the selected site and always shows a general tab where you can isolate this site to a specific PHP version. This tells Herd to serve this site with a specific PHP version and not to use the global configuration that you apply in the settings.
If you select a specific Node.js version, Herd creates an .nvmrc
file in your project directory. This tells your terminal to switch to the selected Node and NPM version automatically.
Open in IDE
You can quickly open the site in your IDE by clicking the "Open" button or by running the herd edit
command in your CLI. You can set your default IDE in the Herd Settings under the "General" tab. Currently, PhpStorm, VS Code, and Sublime Text are supported.
Please note that site-wide opening is only available for PhpStorm and VS Code due to limitations with Sublime Text. However, you can still open individual files in Sublime Text, such as when clicking on a location in the Dumps window.
[!NOTE] For PhpStorm, make sure to install the latest version of the PhpStorm protocol handler. For Sublime Text, the subl-protocol is required.
Information
The information tab shows driver specific information about the application. For Laravel applications, that's the content of the php artisan about
command, but you can customize this with a custom driver.
Integrations
You can connect a Herd site with one or more sites on Laravel Forge. You can learn more about this feature in Forge Integration docs.
#Site Actions
Site Actions are like shortcuts from the site manager. They allow you to open your favorite terminal directly in the project directory, start a Tinker(-well) session or launch your IDE.
If you open the database, Herd tries to open the application database with its tables in TablePlus but uses AdminerEvo in case that you don't use TablePlus. This gives you quick access to the database on the basis of your .env
file.
The log action is available for Herd Pro users and opens the Log Viewer that ships with Herd Pro.
Securing Sites
You can serve sites via HTTPS instead of HTTP if your application requires this via Securing Sites.
Favorites
If you are working with many sites at the same time and don't want to use multiple parked directories that you add and remove when you need them, you can mark sites as favorites and they automatically appear at the top of your sites list on the left side.
Deleting Sites
You can fully delete parked sites from your Herd directory with the trash icon. This is identical to deleting their folder with all files, so use this carefully.
#Best Practices
It's a good practice to name your local sites like your domains and subdomains to easily access them in your browser. As an example, the Herd website usually lives in the directory ~/Code/herd.laravel.com
so that it's accessible via http://herd.laravel.com.test
. The Laravel website is in the directory ~/Code/laravel.com
, etc.
[!NOTE] Directory names must not start with
www.
. Herd strips this part to allow you to access your local site viawww.laravel.com
andlaravel.com
.