kaz Posted October 7, 2021 Share Posted October 7, 2021 A question for the developers who work on multiple projects at the same time: When working localhost on several projects at the same time, must the /wire folder be placed in the project folder for each project? Or is there a solution for developers that works by with a single /wire folder? Maybe a link in the config to a fixed /wire folder outside a respective project folder? If the environment has anything in common with it: I use the MAMP PRO macOS development solution. Link to comment Share on other sites More sharing options...
kongondo Posted October 7, 2021 Share Posted October 7, 2021 99.9% of the time I use option #1 as detailed here, i.e. multiple sites with multiple databases AND ONE wire folder. Each site has its own database and /site/ directory (templates, modules, etc.). If I need a site (project) to be stand alone, I create the site separately with its own wire folder. 1 Link to comment Share on other sites More sharing options...
kaz Posted October 7, 2021 Author Share Posted October 7, 2021 @kongondo I will try that, thanks! Link to comment Share on other sites More sharing options...
LMD Posted October 8, 2021 Share Posted October 8, 2021 Another approach I use on my local dev environment, for completely unrelated projects on different hosts, is to simply symlink the 'wire' folder. My Setup/Structure: /www <-- my localhost root (I'm using Laragon). /processwire <-- folder dedicated to ProcessWire projects. /wire <-- the ACTUAL location of the wire folder that the symlinks point to. /project_a <-- each separate project (treat this folder as the web root: http://project_a.localhost/ ) /site <-- the project's ProcessWire /site folder /wire <--- this is a SYMLINK to the /www/processwire/wire folder /.htaccess <-- the ProcessWire .htaccess file. /index.php <-- the ProcessWire index.php file. /...etc <-- any other files that you'd put in the web root of a project (robots.txt etc). /project_b <-- same folder/file structure as above When I want to update the ProcessWire version, I just download it and copy the 'wire' folder over into /www/processwire (I actually rename the old folder, copy over the new and check everything works before deleting the old folder). Adding a New Project My process for adding a new project, we'll call it 'project_c', is then: Create the project in the ProcessWire projects folder: /www/processwire/project_c Create a local url for the project (http://project_c.localhost/) and point it to the newly created folder above. In the 'project_c' folder, unpack a copy of ProcessWire (the same version as the current shared wire folder for simplicity). In the browser visit http://project_c.localhost/ and run the installer as usual (& create the DB). Once installed successfully, delete the /www/processwire/project_c/wire folder (or rename it and delete later if it all works ok) and create a symlink to the shared 'wire' folder. The advantage of this for me, is that it does away with the need for naming the site folders 'site-project_a', 'site-project_b' etc. 3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now