Change creation date of an entry


#1

I’m moving “old” content to my cockpit instance but the entry date is the current date (obviously) but i need to change the dates so that the content is chronologically. How can i change the creation date?


#2

I don’t know, how to change the creation date, but if you use the backend for importing collections, you lose '_id', '_uid', '_created', '_modified'

If you use the cli, all original data gets stored.

  • Open your console, navigate to cockpit and run ./cp export --target outputfolder (or maybe php ./cp ...)
    • Now you have an “outputfolder”, which contains the folders /cockpit, /singletons, /collections.
    • Delete the folders and files, you don’t want to import.
  • Create a collection “newcollectionname” in your new Cockpit.
  • Rename outputfolder/collections/oldcollection.json to outputfolder/collections/newcollectionname.json if you changed the name.
  • run ./cp import --src outputfolder in your new cockpit

All your old collection data should be stored with original ids and dates.