Change public folder for Local 5.x

I know how to change the public folder for Local 3.x but in 5.x root is set to {{root}} and if I change it to /app/my_folder_name I get a 404. Where is {{root}} defined? Am I able to change the public folder for 5.x?

{{root}} is the absolute path to the site directory with app/public appended to the path.

So, if your site path is /Users/USERNAME/Local Sites/vinyl-destination, {{root}} will be /Users/USERNAME/Local Sites/vinyl-destination/app/public.

You can always replace {{root}} with the absolute path to the directory you wish to use. And by absolute path, I mean something like the following:

  • macOS: /Users/USERNAME/Sites/site-files/www
  • Windows: C:/Users/USERNAME/Sites/site-files/www (note, the path on Windows needs forward-slashes)

Note for Local Classic (3 and below) vs Local Lightning (5 and newer):

Classic uses Docker mounts to mount the site’s app directory as /app. Since Lightning uses native processes, all paths are now reflective of where they are on your computer and not abstracted through volumes.

Great, thanks. All good now. :+1:

1 Like

By the way, is there any roadmap for when other versions of PHP might be added to 5.x? I have a few sites running an older version of a CMS that won’t work on versions of PHP higher than 7.1.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.