From Mautic 5.2.5 to Mautic 6.0.1

I’ve been using Mautic 5.2.5 for a few months now, and I’d like to migrate to Mautic 6.0.1 without starting from scratch.

Is it possible to upgrade by simply replacing the PHP code? Or is there a specific procedure to follow?