Below are the steps required:
1)You may Login to Dashboard of current WordPress installation : http://domainname.com/foldername/wp-admin
2) Go to Settings >> General.
3) Change the Site URL & Home URL to http://domainname.com/ or http://www.domainname.com/
4) Click on "Save" button at bottom. This will log you off the Dashboard.
5) Go to Control Panel >> File Manager.
6) You may than directly choose the root directory which is referring to the "public_html" directory to proceed with the next step.
7) Once inside you may than move the needed directory which is for example the file under "wp" directory to the "public_html" which is the root directory mentioned.
8) Click on the "Move File(s)" button complete the action do remember to enter the correct path.
9) You have successfully manage to migrate your WordPress web files to the root directory required.