If you are not on the latest version, you will have to perform the intermediate upgrades one at a time i.e. if you are on v5.0.X, then you need to successfully upgrade to v5.1.X, followed by v 6.0.0 and then v6.5.X.
If you are not on the latest version, you will have to perform the intermediate upgrades one at a time i.e. if you are on v5.0.X, then you need to successfully upgrade to v5.1.X, followed by v 6.0.0 and then v6.5.X.