This guide explains how you can update Optifine for all versions of Minecraft. You need to download the new version of Optifine and after that all the profile editing process is given below in detail.
Open your browser and type optifine.net/downloads.php There will be two new versions of Minecraft. One will be having UC4 and the other one will have UC5 at the end. You can find all the versions of the Minecraft at this page.
Whatever version you are using of Minecraft, just click on the Download option.
You will be redirected to the Adfly page. Don’t click on anything, just click on “Skip Ads” once the 5 second time ends at the top right corner of the screen.
After that, you will be taken to this page where you have to download the Optifine version 1.6.4.
Click on Save File from the pop-up that will appear. Now you will need to click this newly downloaded .jar file and drag it to your Desktop.
Right-click on it and go to Open with->Choose Default Program and set it to Java Platform SE Binary. then click on the OK button. A new window will pop up and you have to click on the Install option.
Once it is successfully installed then you will need to open your Minecraft and will see the latest version of the Minecraft launcher. After it gets set, you have to go to Edit Profile->User Version and select the version of optifine that you will be having and then click on Save Profile.
In this way, Optifine can be updated for all versions of Minecraft.