To upgrade from an old distribution, see
https://www.dokuwiki.org/install:upgrade#upgrading_an_old_distribution
A more direct method is simply to install the latest distribution and copy over your data/pages and your data/media. You can then install the searchindex plugin to rebuild your index. Using this method you will lose your history. I'm not sure what changes have been made over the last 8 years to the meta files. But you might find that you can also copy your data/meta over to the new wiki, in which case you will have also saved your history.