I have a controller rendering which is referenced by the standard values on most of my page templates and I need to substitute it everywhere it is used to use a different controller rendering instead.
I want to do this in a safe way without deleting the item. I know I could delete it and then use the Sitecore out of the box 'linke to another item' option that is given in the popup when confirming the delete. However I want to keep my existing item for the time being.
I have seen posts such as this: https://community.sitecore.net/technical_blogs/b/sitecorejohn_blog/posts/programmatically-update-layout-details-with-the-sitecore-asp-net-cms
But I wondered if there is an easier/better/safer way to do this.
Also I know I need to consider both the Renderings and Final renderings fields as I using Sitecore 8.1 update 2.
-- Update --
Additional information is that the rendering in question is synced with Unicorn to Staging and Prod so the solution here needs to account for this item existing in other environments. Ideally I'd do it once locally and unicorn would track the changes and push the change out to Staging and Production. One issue though is that we don't have all content locally and we don't sync content with unicorn (just templates, layouts etc).