Forum
Local database/live database
I'm going to add a blog to an existing live Perch site and also at the same time update Perch to the latest version. I'll carry this out on a local copy of the site first. In the time it will take to do this my client may wish to edit the live site or visitors may fill out a form on the site.
My question is, when I've finished working locally what is the best way to bring the local database together with the live database?
I've read https://forum.grabaperch.com/forum/02-07-2016-recommended-method-for-updating-a-live-site-with-new-contentassetsregions. Not sure if similar?
You shouldn't need to worry about the database, as Perch will automatically create the new database tables when you deploy the files and go to the Blog app in the control panel.
Hi Louise, I hit this question many times myself. Bringing local development back to the live site is a challenge not unique to Perch. Thankfully, I think with Perch it's about as easy as it can be.
I find each situation is different and needs a slightly different approach. Here are my thoughts on how I think I'd do things in your circumstance. I hope it's helpful. (I'm sure there are other ways, I'd be really interested to hear thoughts from others).
Firstly to say, when the local work is done, there is not a need to upload the local database back to the live site.
It looks like quite a long list, but the general gist is: avoid the temptation to enter lot's of content locally. Do that on the live site, after you've uploaded the files and templates you developed locally. This way, you avoid the complicated task of merging two databases.
Update Perch Core (locally and live)
Develop Blog locally
Initial upload to live site
Add real Blog posts
Upload remaining files
Other things to consider:
Thanks for your replies Drew and Simon.
Simon – your advice on how to tackle this is super helpful, thank you. Originally I thought I'd enter initial content locally, but the above makes so much more sense now. Will let you know how I get on.
Hi Simon, all went really smoothly following your very comprehensive steps, thank you!
Just in case this helps anyone else, the only thing I could perhaps add to the 'other things to consider' part of the list is, if you change any Perch blog settings or add categories, to remember you'll need to repeat this for staging and live.
That's great to hear Louise. Thank you for letting us know. :)