Kindly advise me. I have my Wordpress website built locally on my machine. However, I installed a new fresh WordPress and uploaded my theme from my Local server to live server. my question is how can I use the WordPress importer to get content to the live server from the old one. Two do, I need to upload the downloaded XML file from WordPress importer to my hosting. And also i want to be able to install plugin from the importer as well.
Try using All-in-One WP Migration plugin - https://wordpress.org/plugins/all-in-one-wp-migration/
It takes care of everything out of the box.
You shouldn't use the importer tool. It would be better to copy the entire wordpress directory onto your live server rather than installing a new site. Then copy the db contents on to the mysql of your server. Make sure to change the db name, username, and pw in the wp-config after you've uploaded. Then in your db, you'll need to change the references from your local server to your live web address. I usually use this tool to change those references:
seeing as you already have the live db, you could just replace the contents of that one with your localhost via phpmyadmin. I might also suggest keeping the wp-config file from your current live so you can just replace the localhost version.
if you are set on using the importer, use the export function from your local installation (tools: import / export) which will create an xml. on your live server got to (tools: import / export) and choose import. It will require a plugin installation when you choose wordpress. That will load all posts and comments. As for plugins, transfer them the same way you did the theme. you can move them via ftp and then activate within wordpress. Or zip them individually and install as a new plugin on the live server.