For the next time, read the docs https://docs.moodle.org/311/en/Upgrading. Start at Step 1 then Step 2, etc.
If you are planning a long journey, here is the route planer: http://www.syndrega.ch/blog/#php-and-dbms-compatibility-of-major-moodle-releases.
If you are planning a long journey, here is the route planer: http://www.syndrega.ch/blog/#php-and-dbms-compatibility-of-major-moodle-releases.