yeswework / fabrica-dev-kit

A toolkit for faster, smoother WordPress 5 development
https://fabri.ca/
MIT License
274 stars 27 forks source link

Multisite/multitheme ? #6

Closed samburgers closed 7 years ago

samburgers commented 7 years ago

Hi, does this project support multi-site installs, namely multiple themes in the same install?

Cheers

andrewstaffell commented 7 years ago

Hi @samburgers,

Multisite: actually we haven’t tested this since porting the kit from Vagrant (which we used in earlier versions) but we don’t foresee any fundamental issues. Try setting up a project and then adding define( 'WP_ALLOW_MULTISITE', true ); to www/wp-config.php (within the project folder)... let us know if you run into any issues. In any case we'll aim to test it shortly.

Multitheme: this is certainly no problem, there can be as many themes as you like in the www/wp-content/themes/ folder, and you can switch to a theme other than the one compiled by the FDK build script from the dev/src folder (but, of course, any other theme won’t benefit from any of its optimizations).

Hope that helps, let us know if you have any further questions.

samburgers commented 7 years ago

Cool, will certainly start some proper testing if multisite is/will be supported. Thanks for that

With the Multi-theme setup for a particular project, I will need to build say 3-4 production ready themes, that each of the 8 or so sites in the network can use. So all themes will need to be run through the build scripts before a deployment. Is that something is/will be supported?

Many thanks!

andrewstaffell commented 7 years ago

Right now the build script just processes the theme named at setup, compiling it from dev/src/ to www/wp-content/themes/<project-slug>/. But adjusting the script to repeat the process for several folders/themes is probably not very hard. We'll have a think about the neatest way to do this without overcomplicating the setup etc.

andrewstaffell commented 7 years ago

Hi @samburgers, just to let you know we've refined our thinking about multisite a bit. The recommended approach is to use one FDK instance per theme being developed. You can work on as many FDK projects simultaneously as you like (each is automatically assigned a different localhost port), and the built themes can all then be pushed to the same multisite production environment. There is no need to have multisite locally to work in this way. Let us know if you have any further questions, or we'd be delighted to have any feedback once you start developing, assuming you haven't already.