I have developed a site in the url www.example.com/demo on now i want to move the site to www.example.com on the same server what are the steps that are to be taken to move the site on the same server with the same database.
You need to modify database table core_config_data In that set path web/unsecure/base_url value www.example.com AND web/secure/base_url value = www.example.com
You want to change only two things in the Magento backend:
System >> Configuration >> Web >> Unsecure >> Base URLto new url.
System >> Configuration >> Web >> Secure >> Base URLto new url.
Just copy all the files from demo folder to root folder. Since Database configuration in file will be same, so you don't need to change those. In database Run this query
SELECT * FROM core_config_data WHERE path = 'web/unsecure/base_url' OR path = 'web/secure/base_url';
change base secure and unsecure url to www.example.com.
Clear the cache and your are ready with www.example.com