website is still in localhost

WordPress hardcodes the domain into many of its permalinks in the database.

An easy solution is to download an SQL dump of the database on your host using phpMyAdmin or an SQL client, and then opening the SQL file in a (robust) text editor, assuming your database isn’t enormous.

Then run a Find / Replace for the old domain (localhost) and replace with the new domain, and save the file. Then you’ll need to execute the new SQL file on the database, so it is replaced with the same database with the proper domains in the permalinks