I am in the process of transcribing my Grandfathers journal from Mesopotamia in 1920-22. In it he uses mildly derogatory terms regarding local population which would undoubtedly not be used today. They could be considered racially offensive comments by some but I don't believe the comments to be grossly offensive. My intention is to publish them on a website. Is that likely to be a legal problem?
No. Even if the comments were grossly offensive, there wouldn't be a legal problem.
There could be a problem if the comments were such as to be "inciting religious hatred" (which is illegal, see Racial and Religious Hatred Act 2006), but it doesn't sound as though that is an issue.
Note that if you are publishing the journal on a website, the website may have its own terms of service which you will have to comply with, and these may be more restrictive. Having said that, I would expect that an introductory note warning that, in common with most of his contemporaries, your grandfather was a racist when he wrote this journal would be enough.