On Sharepoint 2013 when you modify and save a published item you get a draft version with the last published item still published:

No.    Modified                 Modified By           Size  
2.1 11/13/2018 4:07 PM          administrator         4 KB  
This is the current published major version
2.0 11/13/2018 4:07 PM          administrator        3.9 KB

After that you publish the 2.1 version and get a 3.0 one. Is there any way to go back to the last state from here? I mine if you unpublish the file you will go back to the same thing without the 2.0 as current published major version.

Can we undo last publishing but keeping publishing on 2.0 version and keeping 2.1 as a draft (programmatically or not)?

I know I can restore 2.0 and than republish it but I would like to keep the version number as previously.

Thanks, Romain.


Yes it's possible with SPFile.Versions.RestoreByID(Int32, String).


  1. SPFileVersionCollection Class

  2. Sharepoint Tips & Issues.

  • RestoreByID will create a 3.1 version with the 2.0 content and if I publish the page, I will get a 4.0 one.
    – rtisne
    Nov 14 '18 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.