Written by Marco Conti Thursday, 27 November 2008 18:35
NOTE: Since I wrote this article a lot of things have changed in the Joomla! world.
A new component called CBJuice now can do the same process easier and faster. Download it here.
I will be writing a new article about the process and probably I'll produce a screencast on the subject as well. All the same, knowing how to interact with PhpMyAdmin is an invaluable skill. Read the entire article and apply it to your needs.
I needed to move about 300 registered users from my site www.hondagb500.com, built on Joomla 1.5RC3 to a staging site using Joomla 1.5.8. Back when I built the site, I made the mistake of using a Joomla 1.5 RC3 version, thinking that it would not be that much different from the final release, but I was wrong. As it turned out, very wrong. To make a long story short, by the time Joomla 1.5.8 rolled around I figured I neglected my users for way too long and the guilt was eating me alive.
I read up on the upgrade path from RC3 to the stable version and it was very complicated and clearly not very straightforward. So I decided to build a brand new site and move what little content I had over. The only problem I had was how to move my users.
I searched the Extension directory for good component that could do that for me, but it turned out that there weren't any. The only one I found was for Joomla 1.0 and I did not want to risk it. Plus, the instructions were almost as complicated as the upgrade path and the results far from assured.
I proceed to open up my database in PhpMyAdmin and I compared the jos_users table (I used the default jos_ for my DB) of the RC3 version with the newer Joomla 1.5 version. They looked identical.
So far so good, so I went ahead and I dumped the table to disk and I uploaded it to the new website. No dice. It worked, but none of my users showed up in the user list in Joomla.
Fortunately, I was using Community Builder and when I went to check it, that too was empty. But I had an idea. I used the "Tools" feature and I tried syncronizing the user table. That seemed to work, so I tried checking the CB database. That didn;t work too well, but it gave me some useful input. It showed that while CB was seeing the users, there were as many missing records as I had users in these two tables:
The answer was clear: I needed those table too. So I dumped those tables as well and I uploaded them to PhpMyAdmin.
Sure enough, I go back to the CB tools and after running the synchronization all my users showed up. I went back to the regular Joomla user list and they were all there as well. What's more, their passwords also worked (at least my own registered user test account did).
That's great, you'll say, but how do I do it? Easy, follow these steps:
I'll assume you have one originating Joomla site and one new Joomla site without users (except for your account). Remember to make a note of your old admin account as that will be the one that will let you back into the site. Remember to back up both of them before you proceed.
Should you have any problems during the course of the transfer, reload the backups and start from scratch.
If you use Community Builder, make sure you Synchronize your users (Components > Community Builder > Tools > Sync users) and pay attention to any errors you may see.
If you are familiar with PhpMyAdmin, at this stage you can also do several things to your user tables, such as approving those that did not confirm their registration, giving different privileges to some users, etc. You can download any of those tables in .csv format and you'll see that the data actually makes sense and it allows you make changes quite easily.
In conclusion, there is no need to get fancy scripts to move users to another Joomla site. This method is easy and fairly foolproof. You can always start from scratch and unless you make a serious mistake you are not touching the original.
You have now exported your user database. Open this csv file in Excel or some other spreadsheet program.
Now go into your user database and alter any admin or superadmin or special usergroups that people were assigned to. If you have a wide variety of people assigned to usergroups, this method may require additional editing of users after they have been imported. | < Prev | Next > |
|---|
Conticreative offers Individual and Corporate training (in person or online) on Joomla, Wordpress, Zen Cart and other leading Open Source scripts.