Tag Archives: Magento

How to get site URL – Magento

You can use the following function to get site urls .

Below given are the function with different arguments

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) – http://phpcodez/js/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) – http://phpcodez/index.php/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) – http://phpcodez/media/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) – http://phpcodez/skin/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)  -http://phpcodez/
$currentUrl = $this->helper(‘core/url’)->getCurrentUrl();

how to migrate magento from one server to another server ?

Follow the below given instructions

1) Back up the files in the server

2) Export the Databse

3) Move the files to the new server

4) Import the databse to the new server

5) Edit the database details . please update the file “app/etc/local.xml”, with the latest Database details

6) Modify the table core_config_data (Replace old server name with new one).

7) Delete the files in “var/session” and “/var/cache”