I have a dev and prod instance of my site. I cloned my Prod to my Dev server. Now I created a new display block inside an existing view on Dev. I tested it and it works. Now i want to export it to my Prod, but it has the same View name. I can manually create it on prod, but thats the slow way of doing it. If i export the view code and paste it to my prod, would it throw an error saying that view exist? Or would it just merge the changes and add in the new display i created?
WHOA STOP. haha
Install the Features module and create a feature with this View in it and deploy (git/sftp) the Feature up to production. then revert feature and boom. latest view is there.
- Download, enable Features on Dev
- Create a new Feature
- Add your View to this Feature
- Save the exported feature into your file system for Drupal
- Enable on Dev and verify that it is in the default state (it should be)
- Download, enable Features on Prod (or use git to merge you dev branch into prod)
- Place this new Feature onto prod (either using git or SFTP)
- Enable this feature on prod. Since you have the View already, it will probably be Overridden. You can simply view differences (using Diff module) or revert it.
Note: I highly recommend a staging environment between development and production so you can test these types of reverts and adjustments prior to making changes on a production site.