Tutorials for Magento and Joomla! - Yireo

Moving a MageBridge site

When you move a MageBridge environment to another server, there are various things you need to do to get things working again. In general, you are moving a Joomla! application and a Magento application - which should be copied as you normally would. MageBridge only brings in one database table that needs changing.

Getting the files and database

Both Joomla! as Magento are composed out of files and a database. The first thing you need to do is copy all the files to the new server. Also you'll need to export the MySQL databases of both applications and import them on the new database-server.

A tool like phpMyAdmin gives you a lot of options, but if you're dealing with a larger Magento database (with a size above let's say 20Mb) you might be running into the upload-limits of the new server. In those cases, the only ways to import the database are either through shell (SSH) or some other tool offered by your hosting provider.

Note that when importing the Magento database, you might need to disable a thing called foreign key checks. MySQL checks the relations between tables, but this might prevent you to do a proper import.

Check out our tutorial Magento backup through phpMyAdmin for more information.

Modifying the Magento configuration

When you have copied all the files and imported the database, you'll need to reconfigure Magento to make use of the new database. This information is stored in the file app/etc/local.xml within the Magento site.

<default_setup>
    <connection>
        <host><![CDATA[localhost]]></host>
        <username><![CDATA[magento]]></username>
        <password><![CDATA[magento]]></password>
        <dbname><![CDATA[magento]]></dbname>
        <active>1</active>
    </connection>
</default_setup>

Besides this configuration-file, there is one database table to change as well: The table core_config_data contains various references to URLs, which probably need to change. One thing to look for is rows with a column path beginning with either web/secure or web/unsecure.

SELECT * FROM core_config_data WHERE value LIKE "http://OLDSITE/%"

Please note that moving a Magento site might be much more complicated, if you are also using the Magento Downloader application. Use the following Magento documentation for complete instructions:

http://www.magentocommerce.com/wiki/groups/227/moving_magento_to_another_server

 

Modifying the Joomla! configuration

When moving the Joomla! site, the same applies as for Magento: You'll need to change the database definition to point to the new database. This information is stored in the file configuration.php. Look for the following entries:

var $db = 'joomla';
var $user = 'joomla';
var $password = 'joomla';

Modifying the MageBridge configuration in Joomla!

Last but not least, you'll need to change the MageBridge configuration, which is still pointing to the original Magento API-host. These details are stored in the database table jos_magebridge_config. Look for the entry for the host, which contains the hostname of the Magento application.

Modifying the MageBridge configuration in Magento

In Magento, there is actually no configurable option to set the Joomla! URL. However, when the API-connection is set, MageBridge will cache the API settings of the Joomla! site (either XML-RPC or JSON-RPC). Within the Magento Admin Panel, under CMS > MageBridge > Settings you can simply hit the Reset API button to reset these data.

Sometimes these API settings get stuck in the Magento configuration. To fix this, you can also run the following MySQL query:

DELETE FROM core_config_data WHERE path ="magebridge/settings/api_user";
DELETE FROM core_config_data WHERE path ="magebridge/settings/api_key";
DELETE FROM core_config_data WHERE path ="magebridge/settings/api_url";

Changing licensed domains

If the domainname changes, you also probably want to modify your MageBridge licensed domains within your Yireo Account. 

Created on Wednesday, 28 April 2010
Modified on Thursday, 20 October 2011

About Yireo

Yireo tries to help webdevelopers build successful Joomla! and Magento sites.

More about Yireo