Change mangeto domain name

4 steps:
first, upload all files to your new web hosting;
second, restore your mysql database to your new one;
third, edit /app/etc/local.xml, and update to your new mysql database information, take care the following code:





1


Magento creates a cached file with the old passowrd stored inside:
var/cache/mage–c/mage—CONFIG_GLOBAL
Just remove that file also.

forth, edit ajexconnection.php, just under your web hosting root, and change to your new mysql database also.

fifth, modify your database using a tool such as PHPMyAdmin, and edit the ‘core_config_data’ table to update the base URLs (/web/secure and /web/unsecure)

Also need to check mysql database, change your old domain name to your new domain name at different places, say:

UPDATE tablename SET tablefield = replace(tablefield, “findstring”, “replacestring”);

UPDATE catalog_product_entity_varchar SET value = replace(value, “Glassespeople.com”, “Eye4eyeglasses.com”);

UPDATE catalog_category_flat_store_1 SET meta_title = replace(meta_title, “GlassesPeople.com”, “Eye4eyeglasses.com”);
UPDATE catalog_category_flat_store_1 SET meta_description = replace(meta_description, “GlassesPeople.com”, “Eye4eyeglasses.com”);
UPDATE catalog_category_flat_store_1 SET description = replace(description, “GlassesPeople.com”, “Eye4eyeglasses.com”);

UPDATE catalog_category_entity_varchar SET value = replace(value, “GlassesPeople.com”, “Eye4eyeglasses.com”);

UPDATE catalog_category_entity_text SET value = replace(value, “GlassesPeople.com”, “Eye4eyeglasses.com”);

UPDATE cms_page SET content = replace(content, “Glassespeople.com”, “Eye4eyeglasses.com”);
UPDATE cms_page SET content = replace(content, “glassespeople.com”, “Eye4eyeglasses.com”);

Last point, you may like to empty the following log files:
log_url
log_url_info
log_visitor
log_visitor_online

log_quote
log_customer

No need to do this yourself, the Magneto system has a built-in for cleaning up log information. If you go to
System > Configuration > Advanced > System > Log Cleaning
You can configure your store to automatically clean up these logs.

or run the following via phpmyadmin:
TRUNCATE `log_url_info`;
TRUNCATE `log_visitor_info`;
TRUNCATE `index_event`;
TRUNCATE `log_visitor`;
TRUNCATE `log_url`;
TRUNCATE `report_event`;
TRUNCATE `dataflow_batch_import`;
TRUNCATE `dataflow_batch_export`;