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:


Magento creates a cached file with the old passowrd stored inside:
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, “”, “”);

UPDATE catalog_category_flat_store_1 SET meta_title = replace(meta_title, “”, “”);
UPDATE catalog_category_flat_store_1 SET meta_description = replace(meta_description, “”, “”);
UPDATE catalog_category_flat_store_1 SET description = replace(description, “”, “”);

UPDATE catalog_category_entity_varchar SET value = replace(value, “”, “”);

UPDATE catalog_category_entity_text SET value = replace(value, “”, “”);

UPDATE cms_page SET content = replace(content, “”, “”);
UPDATE cms_page SET content = replace(content, “”, “”);

Last point, you may like to empty the following log files:


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`;

King Php Science Welcome, you are from: