thepurpleblob Posted October 28, 2018 Share Posted October 28, 2018 I'm completely new to Processwire (but not PHP development) and have been playing around with the included sites. I'm slightly hazy about the best way to start my own development. Is it normal just to start with an existing site, dump the 'install' directory and so on? To deploy the site just backup and restore the database and copy the (and my) Processwire code and modified site to the live server (well, I'll use Git)? I think I might be asking if there's a fancier way to handle database changes/upgrades once my site is launched and then there are subsequent changes. I'm wary of creating any 'gotchas' down the line when I want to deploy the site - in particular around the database. Sorry for vague questions Link to comment Share on other sites More sharing options...
pwired Posted October 28, 2018 Share Posted October 28, 2018 My advice is to get into the Processwire delayed output strategy, my experience is that it gives you the best code organization and flexibility. Yes there are many posts already in the forum about deploying and keep in sync. Just do a search for it. Link to comment Share on other sites More sharing options...
psy Posted October 28, 2018 Share Posted October 28, 2018 Hi @thepurpleblob and welcome to ProcessWire Hrmmm, yes your question is a bit hazy and I'm not sure I fully understood it. There are lots of ways to deploy development sites to live including modules to help you through the process. It's my experience that the best way is to: back up/download a copy of the db on the development server (I always install the db backup module https://modules.processwire.com/modules/process-database-backups/) create a new database on the live server and import the db backup from the dev server zip the development files and upload to the live server update the /site/config.php file on the live server to reflect the changes in the db configuration and https hosts options That way, the dev & live server data & files (/site/config.php excepted) are identical including admin logins You may want to install https://modules.processwire.com/modules/process-wire-upgrade/ on both your dev & live servers to easily ensure they're both always on the same PW version Hope this helps 1 Link to comment Share on other sites More sharing options...
thepurpleblob Posted October 28, 2018 Author Share Posted October 28, 2018 That's all helpful. I really just wanted to make sure that there wasn't some magic that I had entirely missed. I'm quite keen on using mustache for templates so I've got a bit of work to do there. I have 'TemplateEngineFactory' installed. I think it's going to be one of those - get stuck in, make a mess, start again things ? Link to comment Share on other sites More sharing options...
pwired Posted October 28, 2018 Share Posted October 28, 2018 Here is one I found for you https://processwire.com/talk/topic/5417-using-git-with-a-cms-for-version-control-and-deployment-on-multiple-machines/#entry53501 There is much more to find in the forum Link to comment Share on other sites More sharing options...
dragan Posted October 28, 2018 Share Posted October 28, 2018 There are helper tools like export/import of pages, fields and templates, built into the core. There are modules like Duplicator you may find useful: https://modules.processwire.com/modules/duplicator/ And here are similar discussions: Link to comment Share on other sites More sharing options...
thepurpleblob Posted October 28, 2018 Author Share Posted October 28, 2018 Ok, that's great. Thanks for the pointers ? Link to comment Share on other sites More sharing options...
LostKobrakai Posted October 28, 2018 Share Posted October 28, 2018 4 hours ago, thepurpleblob said: I think I might be asking if there's a fancier way to handle database changes/upgrades once my site is launched and then there are subsequent changes. 2 Link to comment Share on other sites More sharing options...
elabx Posted October 28, 2018 Share Posted October 28, 2018 Can confirm Migrations works wonderful and the CLI too, I commonly migrate changes to 30+ sites that share the same functionality, using git + migrations CLI. 3 Link to comment Share on other sites More sharing options...
bernhard Posted October 28, 2018 Share Posted October 28, 2018 4 hours ago, elabx said: Can confirm Migrations works wonderful and the CLI too, I commonly migrate changes to 30+ sites that share the same functionality, using git + migrations CLI. Sounds great! Any chance for a short walkthrough of how you are doing it in the tutorials board? ? PS: Welcome @thepurpleblob, hope you enjoy ProcessWire ? PPS: We have also some projects that help you setup new installations of pw fast and easy (mine being alpha) 1 Link to comment Share on other sites More sharing options...
thepurpleblob Posted October 28, 2018 Author Share Posted October 28, 2018 Cool - more stuff to read about! Thanks again everybody!!! 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