Migrating from Joomla to Wordpress
May3Difficulty: 




One of my websites is build on the CMS Joomla. These days I’m much more comfortable with Wordpress.
Today I will guide you, how to easy migrate from Joomla/Mambo to Wordpress.
Migrating Articles from Mambo/Joomla to Wordpress
With this wizzard from Rodney Blevins you can migrate Mambo/Joomla articles and links very easy to Wordpress.
Unfortunately migrating the links didn’t really work for my Wordpress 2.7.
Notice that for this wizzard, both installations of Mambo/Joomla and Wordpress need to be on the same webserver installed.
- Download the wizzard from the above link.
- Create a new folder “export” in the root of your Wordpress installation.
- Edit the config.php file, with the database name, username, password of Mambo/Joomla and Wordpress database settings.
- Incase you have Joomla installed, or you changed the database prefix; you’ll have to edit the var: “$dbprefix” to your prefix. For example: “mos_” to: “jos_”.
- Incase the database prefix for the Wordpress DB is different then “wp_”; open up the index.php file, and search / replace all: “wp_” and change it manually to your prefix. For example: “wp_” to “lee_”.
- Now save and upload the index.php and config.php files to the export folder
- Surf to http://your-wp-installation/export and follow the steps to import your articles or links into Wordpress.
Removing Mambo/Joomla tags from Wordpress posts
Now when your done, it could be that your Wordpress post message contain Joomla tags in the post.
Tags like: “{mosimage}” or plugin based tags like: “{rokaccess}”.
You can easily remove these tags from all your post with some database queries.
Open phpMyAdmin and within your Wordpress database, press the SQL tab.
To see how many post I have with Mambo/Joomla tags, I used this query:
SELECT * FROM wp_posts WHERE post_content LIKE "%{%"
I noticed by the retrieved list, that some of my posts contain the {mosimage} tag.
To remove (replace to empty string) these tags and update my posts, I used the following query:
UPDATE wp_posts SET post_content = replace(post_content, "{mosimage}", "");
Just another check, to see if 0 posts return, if I search in my Wordpress database for the {mosimage} tag:
SELECT * FROM wp_posts WHERE post_content LIKE "{mosimage}"
Migrating users
The next important thing to migrate, will be the user database.
Let’s compare both XML exports from phpMyAdmin, to see the table structures:
Joomla Export:
<jos_users>
<id>64</id>
<name>Lee</name>
<username>Lee</username>
<email>my@email.nl</email>
<password>###</password>
<usertype>Super Administrator</usertype>
<block>0</block>
<sendEmail>0</sendEmail>
<gid>25</gid>
<registerDate>2007-07-25 21:57:51</registerDate>
<lastvisitDate>2009-05-01 18:01:52</lastvisitDate>
<activation></activation>
<params>editor=none</params>
</jos_users>
Same Export in Wordpress would be:
<wp_users>
<user_login>Lee</user_login>
<user_pass></user_pass>
<user_nicename>Lee</user_nicename>
<user_email>my@email.nl</user_email>
<user_url>http://www.ladysign.nl</user_url>
<user_registered>2007-07-25 21:57:51<</user_registered>
<user_activation_key></user_activation_key>
<user_status>0</user_status>
<display_name>Lee</display_name>
</wp_users>
Be replacing the table names in the export, or writing a nice script which creates a INSERT INTO query,
you can prefill the Wordpress database with the users from the Mambo/Joomla user table.
However, there will be one problem.
Password encryption
And that problem is setting over the passwords.
Joomla! 1.5 uses MD5 to hash the passwords. When the passwords are created, they are hashed with a 32 character salt that is appended to the end of the password string.
The password is stored as {TOTAL HASH}:{ORIGINAL SALT}.
That’s diffrent then the MD5 encryption of Wordpress.
For now I’ll solve this, by removing all the Wordpress passwords, and let the user recreate a new one via ‘lost password’.
This is ofcourse not a nice solution. Does anyone has an idea?
Posted in joomla, opensource, php, sql, wordpress |Joomla, / Joomla to Wordpress, / Mambo, / Mambo to Joomla, / MD5, / Migration, / password encryption, / phpmyadmin, / Porting, / sql, / wordpress
» 1 Comment, post your comment now. »
One Response to “Migrating from Joomla to Wordpress”
Hi
Thanks for this post.
I tried to move from Mambo to Wordpress. I follow all the instructions. Nevertheless I had no success. I copied and pasted the password, db name, and usr name several times and the results were always that I had no chance
Any suggestion?














Comments