Solution:
open your wp-config.php file and add this online
define('FORCE_SSL_ADMIN', false );
save the wp-config.php file. You can add just above this line
/* That’s all, stop editing! Happy publishing. */
Now try opening your localhost this should work.