Once you’ve completed your installation of WordPress, login to the admin panel and from the Settings-> General tab, you’ll need to set your WordPress address to the folder you installed WordPress (without the trailing slash) and set the Blog address to your blog’s root address (without the trailing slash).
In a text or HTML editor, open the index.php file and change the location of your wp-blog-header.php to the new location. Example: if your WordPress installation folder is ‘admin’, <?php require('./wp-blog-header.php'); ?> becomes <?php require('./admin/wp-blog-header.php'); ?>
Upload the edited index.php to your blog’s root directory and delete the index.php file from your WordPress directory. If you’re using permalinks or other rewrite rules, the .htaccess file needs to be in the same location as the index.php file.