Last Updated: November 15, 2016
· wjonthomas

Use a symlink with Laravel Valet to rename the "public" folder to anything you want.

If you've used Valet, you know you have to put your assets in a folder called "public" for it to serve your site or app properly. My host requires that I put my public assets in a folder called "public_html". Some people aren't able to change this without the help of their host. Or maybe you can, but this is much easier!

So, here's the tip.

  1. Use whatever name you want for your public assets folder. (In my case, "public_html").
  2. In Terminal, make sure you are in your project root directory
  3. Create a symlink to that folder: ln -s /Your/Path/To/public_html public

And you're done! Valet will now see the "public" symlink and serve your site without a hitch.

Hint: You'll probably want to add the new public folder to your .gitignore file.