lup0z,
If you can access the WP admin dashboard:
- Under Settings > General, change the WordPress address(yourdomain.com/yourwpdirectory or simply yourdomain.com if wordpress is installed in the root of your domain)
- Under Settings > General, change the Site address (most likely yourdomain.com)
- Under Settings > Permalinks, change the structure of your permalinks to Default, save, then change it back to whatever custom structure you desire. This will regenerate your .htaccess file and correctly re-write your URLs preventing menu items and links from returning 404 errors.
If you can’t access the WP admin dashboard, you need to login into your phpMyAdmin, and in your installation’s database look for the wp_options table. Inside that one, find the “siteurl” and “home” and add your location without / after it. Login to the dashboard and do the Permalink trick indicated above and you should be good to go.
As a final touch, you could install the Velvet Blues Update URLs and run a search for https://localhost/nameofyouroldwpdirectory and replace with your current domain. If you mark all the options for the search, it will look for the localhost links inside options, content, etc and replace them. Some might get away, but it will still do most of the dirty work.
Let us know if you require further assistance.