<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[NuBlue - Changing the Underlying Domain for Magento]]></title>
		<link>http://www.nublue.co.uk/forums/topic/247/changing-the-underlying-domain-for-magento/</link>
		<description><![CDATA[The most recent posts in Changing the Underlying Domain for Magento.]]></description>
		<lastBuildDate>Tue, 20 Jul 2010 11:16:46 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Changing the Underlying Domain for Magento]]></title>
			<link>http://www.nublue.co.uk/forums/post/620/#p620</link>
			<description><![CDATA[<h2>Magento : Changing the Underlying Domain for Magento</h2><p><br /><span class="bbu">Overview</span></p><p>There are a number of reasons you might want to change the domain name that Magento runs under.&nbsp; The most common reason being in moving from a development domain to a live domain, but thats not the only reason, may people find it a lot less painful to convert an existing (working!) Magento to a completely different setup and product range rather than starting from scratch.</p><p><span class="bbu">Complexity</span></p><p>Easy.</p><p><span class="bbu">Suitable for:</span></p><p>Shared Hosting<br />VPS Hosting<br />Dedicated Hosting</p><p>Basically this guide works for any Plesk and Magento setup.</p><p><span class="bbu">Requirements </span></p><p>Access to your Hosting Control Panel.<br />The ability to update DNS or nameservers on the new domain so it points correctly.</p><p><span class="bbu">Howto :</span></p><p><em>As ever Nublue recommends that you backup your entire site using your Hosting Control Panel backup utility before undertaking any significant changes to your site.&nbsp; We regard changing the underlying domain of your site to be a very significant undertaking</em></p><p>1) Ensure you have backed up your site in your Hosting Control Panel.&nbsp; This method is robust and we have been using it for several years, but failure to follow it fully can have far reaching implications.</p><p>2) For Magento 1.4 Users Only : Ensure that <strong>System -&gt; Configuration -&gt; Web -&gt; Redirect to Base URL if requested URL doesn&#039;t match it</strong> is switched off during these changes.&nbsp; It shouldn&#039;t make a difference but I have a pathological fear of it as a &quot;feature&quot;, its fine to turn it back on once the work is completed.</p><p><span class="postimg"><img src="http://www.nublue.co.uk/forums/images/redirecttobaseurl.png" alt="http://www.nublue.co.uk/forums/images/redirecttobaseurl.png" /></span></p><p>3) Change the domain within the Hosting Control Panel using the <strong>Domain Administrator</strong> button (Login -&gt; Home -&gt; your_domain.com -&gt; Domain Administrator).&nbsp; Simply edit the very first text box deleting the old domain and adding the new domain (without www.).&nbsp; Ensure that the <strong>www</strong> is ticked if required.&nbsp; Click <strong>OK</strong> at the bottom of the page (all other options on the Domain Administrator page should be left as-is).</p><p>4) We now need to change the base URLs within the Magento database through PHPMyAdmin (To get to PHPMyAdmin : Login -&gt; Home -&gt; new_domain_name.com -&gt; Databases -&gt; Database_name -&gt; <strong>DB WebAdmin</strong>).</p><p>5) Once PHPMyAdmin has loaded (it opens within a separate browser tab/window) click on the table &quot;core_config_data&quot; in the left hand sidebar to open it up in the main frame (Note it might be that the table is prefixed with, either way the listing is alphabetically sorted).</p><p>6) Click on <strong>Search</strong> and for the form section that says <strong>path</strong> select the <strong>LIKE %...%</strong> option, then enter &quot;secure&quot; into the text box for <strong>path</strong> and click on the <strong>Go</strong> button.</p><p><span class="postimg"><img src="http://www.nublue.co.uk/forums/images/phpmyadminsearch.png" alt="http://www.nublue.co.uk/forums/images/phpmyadminsearch.png" /></span></p><p>7) For <em>all</em> the entries returned that contain the URL for the old domain name you need to edit each one and update the details to reflect the new domain URL (you must ensure you maintain the preceding http:// or https:// and any / or directory names on the end of each specific entry).&nbsp; You can edit each entry by clicking on the appropriate pencil icon, making the change and saving.&nbsp; For convenience I open each entry that requires editing into a new window and then work my way through each one saving as I go.</p><p>8) Clear the Magento cache using the <strong>Clear Magento Cache</strong> button in the Hosting Control Panel.</p><p>Thats it, assuming that DNS is correct for the new domain it should load fine when entering the new domain name in your browser.</p><p><span class="bbu">Possible Issues :</span></p><p>The two most likely errors are typos when updating the URLs and failing to reset the cache.&nbsp; Using the phpMyAdmin search facility check all the base URL entries with absolute URLs in them are spelled correctly (and have the preceding and following http(s):// and / respectively).</p><p><span class="bbu">Reversing the Change</span></p><p>Just follow the guide but swap round old domain and new domain.</p><p><span class="bbu">Other Options</span></p><p>This is the way that we change the underlying domain for Magento.&nbsp; The primary benefit for us in this method is that we don&#039;t need Magento admin panel access to do it. You could change the baseURLs from within Magento&#039;s admin panel at Step 2 (<strong>System -&gt; Configuration -&gt; Web -&gt; Unsecure and Secure Base URLs</strong>) and then skip Steps 4 to 7 but as soon as you Save the configuration your Magento store will break till Step 8 is completed.&nbsp; We&#039;ve not done this often so we can&#039;t vouch for how reliable a method it is.</p>]]></description>
			<author><![CDATA[dummy@example.com (NuBlue-Paul)]]></author>
			<pubDate>Tue, 20 Jul 2010 11:16:46 +0000</pubDate>
			<guid>http://www.nublue.co.uk/forums/post/620/#p620</guid>
		</item>
	</channel>
</rss>

