Transferring Users between Joomla! instances
Written by Sam Moffatt   
Tuesday, 17 February 2009 07:46

Another common thread on the migration forum for Joomla! is how you transfer, or migrate, users between Joomla! sites. This guide will show you what tables you need to backup to transfer users between two Joomla! sites, including moving users from a 1.0 to a 1.5 site. This guide assumes that you want to wipe out the users on your target site and replace them completely with the users from the other site.

 

The first step in this process is to export from your Joomla! site. If you've got phpMyAdmin you can use this export the relevant tables you need. First select your database and then select the 'export' option. This will give you a list of tables that are stored in your Joomla! database. If you're using the default prefix, the names of the tables you want to export are:
  • jos_users
  • jos_core_acl_aro
  • jos_core_acl_groups_aro_map
  • jos_core_acl_groups (only required when an ACL hack is installed on the original site, see compatibility note at bottom of page).
If you're using a prefix other than 'jos_', you're going to need to change that to your prefix to match. You can select multiple tables by holding the control button (Command on Mac) when selecting the tables. Whilst you're here, disable the 'Structure' checkbox to prevent the tables from being overwritten. You may also wish to select the 'Save as file' option to get the SQL dump output, however you could also copy the output here as well though I would strongly advise saving to a file.

Navigate to your destination database and look for those three tables again. Select each of these tables in phpMyAdmin and use the "Empty" option. This will ensure that there are no latent entries and prevent any issues reloading the data. Alternatively you can use the following option using the database's SQL option (select the database and then select "SQL"):

TRUNCATE TABLE `jos_users`;

TRUNCATE TABLE `jos_core_acl_aro`; 

TRUNCATE TABLE `jos_core_acl_groups_aro_map`;

TRUNCATE TABLE `jos_core_acl_groups`; # Optional!

 
In the database SQL view (select the database and then select "SQL" again), then select browse and locate the file that load into the site. If you copied the SQL, you can paste this into the supplied form and click the "Go" button to load it up.
 
Note: If you are trying to export from Joomla! 1.0, these instructions should work perfectly fine however you may find out that there are some issues with the users parameters. If you find that the user can't edit articles after doing this process (from either Joomla! 1.0 or 1.5 but 1.0 in particular), edit the user and save them to refresh their parameters. If you want to migrate more than just users, check out the guide on Migrating from Joomla! 1.0 to 1.5 on the Joomla! Documentation Wiki. If you have already tried to transfer your users from 1.0 to 1.5 but have dropped your 1.5 tables, you will need to recreate these tables first Joomla! will work properly (this will manifest in access denied errors). You can get a script to reset 1.5 ACL from the KB Downloads area.
 
Compatibility Note: If you have installed JACLPlus, jxControl or some other tool that permits you to create extra groups you will need to also transfer the 'jos_core_acl_aro_groups' table. Follow the instructions for the other tables with this one (e.g. export, truncate in destination and then import). If you don't do this you may find you have 'invisible' users or 'missing' users even though the database appears to have all of their entries.

 

Last Updated on Sunday, 07 June 2009 17:33