I've read several posts and I've seen one that says before it was Eleven's turn to take part in the events of 'Day of the Doctor', Gallifrey was most certainly destroyed, and when it came to his turn he re-wrote history and saved Gallifrey. But I've rewatched 'Day of the Doctor' recently and the War Doctor asks if he'll remember saving Gallifrey and the Doctor says no. So I'm a bit confused, I don't want to think that the War Doctor or the 10th Doctor have lost their memories after saving Gallifrey and their life of saying they destroyed Gallifrey was a lie. So did they really remember?
Eleven remembers, but War and Ten don't.
From the transcript of Day of the Doctor (emphasis mine):
WAR DOCTOR: I won't remember this, will I?
DOCTOR 11: The time streams are out of sync. You can't retain it, no.
WAR DOCTOR: So I won't remember that I tried to save Gallifrey rather than burn it. I'll have to live with that. But for now, for this moment, I am the Doctor again. Thank you.
DOCTOR 10: I won't remember either, so you might as well tell me.
DOCTOR 11: Tell you what?
DOCTOR 10: Where it is we're going that you don't want to talk about.
This always happens when more than one Doctor share an adventure together: only the most recent one can retain the memories of it. Out of universe, this has to happen because otherwise all but the oldest Doctor would be able to remember everything that happened in that adventure and it wouldn't be interesting. In-universe, it's explained by this conceit of "the time streams are out of sync", which is more or less a "wibbly-wobbly timey-wimey" explanation.
The War Doctor and the Tenth Doctor don't retain their memories of what really happened to Gallifrey after the Tenth and Eleventh Doctors showed up. That means the last thing the War Doctor remembers is going to the barn with the Moment with the intention of destroying Gallifrey, and he will believe that's what he did. He'll keep this belief all through his time as the Ninth and Tenth Doctors (excluding his brief time as the Tenth Doctor meeting the War and Eleventh, as seen in this episode), and through his time as the Eleventh Doctor right up to the events of this episode.
It has to be that way. All the things we saw in the previous episodes need to still have happened, and many of them only happened because the Doctor (Ninth, Tenth, or Eleventh) believed that he'd destroyed Gallifrey. That belief changed him and shaped who he was for all those years and centuries. If history was changed and the old him knew it had been changed, he wouldn't have been the same person and many of the events of Series 1-7 might not have happened at all, or at least they would have happened differently. In order for what we know of the Doctor's timeline to still be valid, the Tenth and War Doctors have to forget the events of Day of the Doctor.