Joomla2Wordpress Import Wizard v.3
Tags:CMS, export, import, Joomla, migration, Script, Technology, Wordpress
I recently switched from Joomla over to Wordpress. One major step which was preventing me from making the move for so long was the export process. Then I found a post on rangit.com which had a script which would allow you to move the content over. But there was a problem. Wordpress had changed its database schema in its latest version (2.3.2) thus breaking the script (linked above). So I decided to take this on as a side project and fix it. I also made some changes which will make it even easier to use this script; such as allowing the user to set table prefixes in the config file.
UPDATE: This version of the script has been tested and works on all versions of Joomla between 1.0.12 - 1.5 and Wordpress 2.3.2 -2.7 and works pretty smoothly. So it should work with the latest versions of both CMS platforms! Make sure to post your success or failure and which version you were using in the comments.
Step by Step Instruction (with Screenshots):
1. Unzip Joomla2WordPress.zip
2. Edit config.php and enter all missing values
![]()
3. Upload files to /export on your server
![]()
4. Add Categories in wordpress which you want to import into
5. Open www.yoursite.com/export/index.php on a browser
![]()
6. Select either a Joomla Section, Category or Links Category
![]()
7. Select a Wordpress Category to import into
![]()
8. Repeat Steps 5-7 till all of your articles have been imported
![]()
9. Enjoy and Spread the word!
Download: Joomla2WordPress Import Wizard
Notes:-minor glitch: If you create a WP category which is empty (has no posts), the articles will import just fine, but the category may not appear in the categories widget until you open at least one post in that category in /wp-admin and just hit save. If anyone knows how to fix this minor bug
Credits
v1: Mambo2Wordpress Import Wizard by Mission:Tech, technology blog.
v2:Joomla To Wordpress by Chris Chee of Rangit.com
v3: Joomla2WordPress Import Wizard by Azeem Khan of Azeemkhan.info
Filed under: Technology
Related Posts:
welcome to wordpress!
[...] http://azeemkhan.info/2008/joomla2wordpress-import-wizard-v3/ [...]
Hi Azeem,
Thanks a lot for your nice work. I have successfully migrated my website http://www.madaboutanything.com/blog/ from Joomla to Wordpress today with your tool.
Thanks once again.
Thank you so much for this. I’ve just tested it and it works fine, I cant thank you enough as you just saved me an incredible amount of work!!
The bug with the category is really minimal. I had a similar bug from the one you describe.
I imported one set of posts from Joomla into a virgin category using the script. The category showed 0 posts. I then created a post and the category showed the right amount. I then deleted some posts from the category via mysql and in WP the number didnt update. It only did once i created another new post in the category.
Thanks again!
Will this delete the joomla database completely? Or will it simply just copy the files and leave the original joomla db intact? Thanks!
It does not delete the joomla db it simply copies the files from the db. If you like you can manually delete the db once the files have been copied. Always remember to back up the db before messing with it.
To do a backup, I suggest using phpmyadmin (click on the db name) click on export, check the box to save as a file, check off gzip compression hit ok and save on your hd.
Is there a way to transfer the comments with each posts as well? I would really REALLY appreciate it if you could let me know a solution…. thanks!
Joomla does not have a bult-in commenting system. What Third party plugin were you using for comments?
I was using JoomlaBoard which I am currently working on another script to transfer my own comments.
Any ideas how this could be made to import from joomla 1.5?
And does this script also import pages/childpages and such?
I have not checked out the database schema for Joomla 1.5 yet. Even if it is a little different it will not be hard to make changes in the script to make it work. It would just affect 1 query, well maybe 2 at most.
Well, if you have the time to look at it I could really use it
Okay, I will check it out. I added a feature to subscribe to comments. You might want to do that. I will try to get it soon. Once I do, I’ll just comment here.
De fries:
Ok try out this extension:
it should allow you to move your content from 1.5 installation back to 1.0.13 (just do a clean install of 1.0.13 in a different folder with a different db)
and then you can use my script. This might be the quickest way to make this work. (I did start looking at the 1.5 db schema, but didn’t have enough time to do any coding)
Sounds like a good work around. I will definitely give it a go. Thanks for looking into it!
[...] uso del Script Joomla2Wordpress te facilitará enormemente el cambio siguiendo los siguientes [...]
De Fries:
let us know if it works out for you
I will.. for now I have installed the suggested joomla component and am getting a lot of errors. Will keep you posted..
hey, im at the step where i have wordpress installed on same db and host as joomla. and i have to silly questions.
1. do i need to create a seperate database?
2. does this only copy the posts i.e not the whole web site (design)
i only have 3 posts so far so it wouldnt be a big deal to re create them i really just need to get my site running off wordpress.
am i barking up the wrong tree? ok thats a third stupid question.
Eddie:
What you need to use this script is:
1. An existing joomla installation
2. A wordpress installation
in the config file you enter the db connections for each db and also specify the table prefixes
I have not tested this script with bot installs on the same database, I imagine that would work, but if they are on separate dbs that would be better.
No this script will not move your template over, this is only to move your actual content.
[...] work with the 2.3 version of Wordpress, so that explains the delay. This new package can be found here (I have also attached the script, README file is [...]
I tried but I could not get it to work properly with Joomla 1.5. So I ended up copying the posts one by one :S
Anyway.. thanks for the help
Thanks for the tool. This worked perfectly. One more question though: Do you know of a tool that can convert joomla templates to Wordpress easily? I haven’t found one and didn’t want to get back into the CSS.
Thanks
@Tarod
I haven’t come across any template converters yet. I am actually thinking of making an app in .NET or Adobe AIR which does just that. Seems like a time consuming project though which would require hours of effort. The biggest hurdles will be completely understanding the respective template structures, and ongoing dilemma will be dealing with changes made in those templating schemes (keeping it up to date).
Thanks this worked AMAZING…
Now all i need a a plug in for Categories that handle 2 or more levels deep.
I have 1000 pages to move over but i need a deep categories structure..
Ill keep looking or have to stick to joomla..
Worked great the first time. Installed WP 2.3.2, ran the tool, then upgraded to WP 2.5.1. Flawless for me. Thanks!
When I proceed to step 2, I get “Query Failed”. How can I solve that?
@rizky check the config file make sure your table prefixes are correct. You would only get this error if the query formed by the script is bad. If you can share the query that failed (its printed out) then I might be able to tell whats up with it.
[...] » Joomla2Wordpress Import Wizard v.3 [...]
Thank you.. I will try it.
Nice tutorial
This sooooo needs to be updated for wordpress 2.5 (2.5.1)
I just migrated from Joomla into WordPress Version 2.5.1 and it worked flawlessly.
Thanks a ton!
As long as the db schema (structure) of WP isn’t changed this script will work on current versions of WP. As Sage above just said he was able to import directly into 2.5.1.
I am assuming the script will not work with Joomla 1.5, but will work with any 1.0.x version
Thanks a million for the script!
I had some problems in the beginning because my Joomla 1.0 site was in Finnish and the script didn’t work proberly when the articles I tried to import had special characters like ä or ö in the title. Changing these characters solved the problem. Migration to Wordpress 2.5.1 workes fine.
[...] Geliştirici: Azeem Khan | Joomla2WordPress Anasayfası [...]
I just exported more than 300 posts (it only took a couple of minutes) to Wordpress 2.5.1 and it worked fine. Thank you Azeem, you did a great job with this script!
Will this work with direct convertion of Joomla into Wordpress MU ? Or will I need to covert first to wordpress 2.5.x and then convert the WP to WP MU ?
@ohad
I haven’t seen the db schema for MU, if its the same then it will work without a prob. Try it, tell us how it goes
Just tried this on one of my sites and worked great :D. (after i downloaded the correct file anyway)
Now to move wordpress to the root instead of a subfolder
And then do it on my other site 
Any suggestions on importing from Joomla 1.5x?
Can i move my user registrations from Joomla to Wordpress with this script?
@Joomler
No the script does not import users, but you can specify in the configuration file which user should be the author of the articles when importing. admin is default. In WP create the users first before using the username in the configuration file.
Hi,
First at all its a great thing to make this happen.In spite of the fact that I have more interess in joomla I have seen that its much more easy to get results on the internet by using wordpress.Anyway, I have a running joomla 1.5 site and wanted to change it into wordpress.
I folow the instructions above:
İnstall a 2.2.2 Wordpress , make the necessary changes on the config.php file and run it.
It has worked!
Step 1 and step 2 appeares but there is a major problem!
The characters gets lost!
http://v2.geyve.org/wordpress-to-joomla.jpg
ş,ç,ı,ğ,ö,ü characters are used in the turkish language ( Usally needs ISO-8859-9)
I cld not understand why because both of the databases uses utf-8 as defaut character set.
I wonder if there were anything possible to show them corrctly.
Hi !
Wordpress to Joomla ?
Varmı kardeş ?
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/pliktech/public_html/export/index.php on line 534
what wrong ?
Hey guys
I’m getting a Query Failed at step 3 - no idea what is going wrong.
Trying to move Joomla 1.5 to Wordpress 2.5 or 2.6 - both of them fail on step 3.
Please heeeeeeelp
I tried using this to import the Joomla articles. It must be connecting to the database for step one because it successfully pulled all the categories. Great. But once you select it to move to step two, I got the following error:
“Query Failed”
I’m using wordpress MU but I don’t think that is the problem as the general article structure I believe is the same, but I’ll try it again with a different version.
Upon further review, this script only works for up to Wordpress 2.3. Use that and then upgrade the database to the current 2.6. It works like a charm.
This script only works for wordpress 2.3, so I have imported to an temporary blog and after import I have upgraded it.
I worked without any problem. Thanks buddy.
[...] here’s the article about "Moving from Joomla to Wordpress" :http://azeemkhan.info/2008/joomla2wordpress-import-wizard-v3/ [...]
Can this util export authors to WP as well. I have a multi author site that have many articles contributed by different authors
Thanks
Bill
[...] and easy to use and has a lot of plug-ins and features. I migrated all my joomla content with a script and it worked pretty well. Had to upload and fix all the images manually, and all the comments are [...]
[...] Geliştirici: Azeem Khan | Joomla2Wordpress Anasayfası [...]
query failed Fixed!
jos_ replaced by mos_ in config.php
$joomlatblprefix = ‘mos_
Hi, I’m looking for some scripts to perform an import of joomla’s 1.5.6 blog entries to a clean wordpress installation.
I don’t care about joomla users or whatever.
I just care about posts and related comments.
Anyone?
Thanks,
A.
Awesome! Worked without any problems!
great stuff. thanks a lot
Joomla2WordPress Import Wizard v3 by Azeem Khan
Step One
Okay, we’re connected to the Joomla database.
Now, we need to select the method you want to use to import your articles or links. (You should automatically advance to the next step, but if it doesn’t you can click the button.)
Query failed
What can i do to avoid this matter?
Many thx
Hello,
It’s working but the wizzard has imported only 17 elements on 176 existings ….
do you know why?
Hi,
Import fine but I am getting [...] characters in my posts. Same as post above:
[...] Geliştirici: Azeem Khan | Joomla2Wordpress Anasayfası [...]
I cannot see them/get rid of them in the editor or database tables. Any idea on how to remove them?
Hi
Any tips on importing site not on UTF code page but on win 1250 code page. Characters get messed up. Thank u in advance.
I’m thinking of migrating to either Wordpress or Drupal FROM Joomla 1.0.15. The main reasons:
1. is the lack of consistency for users using Internet Explorer, Firefox and Netscape. Everytime I make a change, it takes hours to check each type of browser and tweak the templates to make it all look OK..and OK is not really good enough!
2. search engines seem to prefer WP or Drupal (even with SEF on in Joomla
3. Joomla just seems less flexible unless I want to use modules and mambots which all seem to conflict one way or another
3. There is no decent integrated FORUM for Joomla (tried FB and currently using Agora which has it’s own issues.
Does any have any advice on which is better. WP or Drupal. I don’t really care about importing the data, I’ll do it manually if I have to and this will give me a chance to rejig a lot of the problems I have with Joomla anyway.
Thanks
Awesome! Joomla 1.0.12 to Wordpress 2.6.5 no snags!
Great work!
Have you find a solution to import comment from joomla?
Thanks
Great work, can anyone import static content?
[...] comments dan data-data lain memerlukan langkah penanganan lanjutan lain lagi. Saya menemukan link Azeemkhan. Import content ini dicoba pada Joomla 1.0.12 dan Wordpress [...]
Is there updated version of script from Joomla 1.0.15 to WP 2.7? I have close to 2,000 contents in Joomla and I really could use some help. Thanks!
[...] joomla-wordpress-import [...]
Hi,

this script is ok also to migrate
joomla 1.5.x. to wordpress 2.7!
I’ve tested in a local site…
The script worked perfectly with WP 2.7
Thanks!
[...] I used Azeem Khan´s Joomla2Wordpress Import Wizard v.3 [...]
[...] oude Joomla database heb ik met een gevonden Query overgezet in Wordpress (query is hier te vinden). Deze hikte helaas op een aantal vreemde tekens (nou ja, vreemd, maar het ging niet goed). Denk [...]
How do I copy images from posts over?? Thoughts?
Dave
What a amazing script. Thanks a lot !!
My joomla website had texts in portuguese with tons of accents (ç,é,á,ó,ü, ê,…). I had problems with that migrating these texts.
To solve this problem without much work, I replaced all ocorrences of “$row[" by "utf8_encode($row[", in the index.html file.
Exemple:
before: $row["id"];
after: utf8_encode($row["id"]);
Hope this information was useful.
[...] Geliştirici: Azeem Khan | Joomla2Wordpress Anasayfası [...]
Hey People, I’m getting this error:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘ODBC’@'localhost’ (using password: NO) in I:\FerozoWebHosting\cepriuca.com.ar\public_html\blog\export\index.php on line 124
Could not connect
Why is this happening?
Hey People, I’m getting this error:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘ODBC’@’localhost’ (using password: NO) in I:\FerozoWebHosting\cepriuca.com.ar\public_html\blog\export\index.php on line 124
Could not connect
Why is this happening?
@Mati
check your username/pw/db credentials.
Yes Azeem, after I left the message I continued checking and it was an error made by me writing the DB name. My bad!, thanks! Great tool!
Hey,
i have one problem. If i use this script i get this error message after step 3:
INSERT INTO wp_term_relationships (object_id, term_taxonomy_id) VALUES (’66′, ‘4′)
Query failed
Have anyone an idea what i can do?
[...] Daí, tempos depois resolvi começar um blog pra valer. Por conta disso montei meu primeiro blog no wordpress e de lá prá cá virou uma bagunça. Cheguei a ter as coisas em três lugares diferentes e tava difícil controlar. Finalmente, depois de muita paciência, terminei de mover tudo pro Wordpress com a ajuda de um artigo que encontrei no site do Wordpress: http://azeemkhan.info/2008/joomla2wordpress-import-wizard-v3/ [...]
Converting from Joomla to WordPress (up to 2.7x)…
Quite a few people use the popular Open Source CMS software Joomla for just about everything they do. And in fairness, Joomla is a pretty flexible piece of code (from 1.5 and onwards anyway). One area where Joomla isn’t all that hot, however, is when …
[...] finding the amazing Joomla2Wordpress script, I was able to successfully move Emergent Future from a Joomla 1.0 install to the latest [...]
Hi Azeem,
The migration worked fantastic!
Thanks!
hello,
greate way how to moving Joomla >> Wordpress .
can you help me moving Wordpress >> Joomla .
thanks
Hi Azeem,
the tool worked fine, many many thanks.
Just for further improvements, I had to rename all post title with special chars (otherwise the script failed with “query failed” message) and images into joomla post weresn’t imported at all.
Big big thanks, you helped me a lot.
Take care,
A.
@benjamin
special chars into post title?
Hey Mate,
You’ve made my day, my week and my year!
Amazing Script!
Thanks so much!
Awesome script. you have just made me look very clever!
the only real problem was a few special chars in post titles, once I read though these comments I figured that out.
thanks for the script and thanks to those that have reported issues and solutions.
I would like to use, however I have a lot of content with images, will this do the trick for it as well or do you have any suggestions
Hi Jimmy,
It worked for me. I just had problems with portuguese accents.
Great script, but I think the lack of support for authors is a fatal flaw. Is there any chance that you might implement that functionality in the future?
[...] 91 Responses on my Joomla to Wordpress Migration Tool - http://azeemkhan.info/2008/joomla2wordpress-import-wizard-v3/ [...]
Help!
Need to migrate a BLANK joomla template into a Wordpress Theme - No content, nothing - just need assistance in deploying the joomla theme into a wordpress 2.7.1 theme.
Any ideas or help on this??
it’s wonderful!
THANKS !!
This came in very handy. Thanks.
[...] I found a post on azeemkhan.info which had a wizard which would allow you to move the content over. But there was [...]
The script is failing on Step Two after I select a category to import. Here is what I get:
Second Step
Importing 645 items
SELECT ID from wp_users WHERE wp_users.user_login = ‘admin’
INSERT INTO wp_posts (id, post_author, post_title, post_content, post_date, post_modified, post_name, post_category) VALUES (”, ‘1′, ‘Welcome to PlanetX64!’, ‘
{mosimage} Welcome to PlanetX64.com, a hardware/software review site for the 64-bit world.
From the folks that brought you PlanetAMD64 comes PlanetX64!
\r\n
\r\nCutting edge technology reviews for the 64-bit community! As the world\r\nmigrates to 64-bits, count on the staff at PlanetX64 to keep you\r\ninformed of the latest news and information regarding this exciting\r\nevolution in our computing experience.
‘, ‘2005-10-13 22:53:52′, ‘2005-11-24 20:09:40′, ‘welcome-to-planetx64′, ‘9′)
Query failed inserting into categories
I tried your script, but it doesn’t support the Greek language. All I get is question marks (???????????????).
Any idea why this happens and what I can do to fix it?
Thanks for taking the time.
Phoat
With WP 2.7.1, I had to modify the query and the database to allow some null values to be uploaded. Also, the ID cannot be loaded as null because it is an auto-incrementing value. However, the script only partially uploads my data. Also, trying to do an entire section at a time causes the few posts that are loaded to all have the same category - the section name - instead of the actual category. This script is very close but not quite there. You seem to be loading up all the data as a huge query. Wouldn’t it be more effective to loop through the joomla database and build a query for each post and then submit it? Your script may be running into memory limits with large sites like mine.
[...] via Joomla2Wordpress Import Wizard. [...]
I’m getting this when I try to open /export/index.php
“There doesn’t seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn’t work for all server setups. The safest way is to manually create the file.”
I’m sure I’m doing something dumb. Suggestions on what I should do?
I am gettig the same problem like steve whit.
I am using joomla 1.5.x and WP 2.7.1
Hi Steve and Mohamed,
probably you only installed Wordpress without opening it at least once. Just go to your WP-Installation and follow the instructions then you should have a wp-config.php.
Greetings from Germany
Andy
*edit*
I read somewhere something… where is your “export” folder? Is it in the WP root? It has to there. Maybe thtá the solution.
*edit*
I read somewhere something… where is your “export” folder? Is it in the WP root? It has to there. Maybe that is the solution.
Hi,
when i convert from Joomla2Wordpress all Article with German Umlauts will strip when a Umlaut (öäü) is in the article…
To Andreas Mohamed, and Steve
YES that is the solution, I has the same problem and I fix it that way. moving the export folder to the WP root
anyone find out if this works with wordpress mu? I’m using Joomla 1.5.10 and Wordpress 2.7
Just curious before I screw something up.
Bob
Hi, I’m having the same problem as Benjamin. When I exported from joomla to worpdress, the script only gets the first 3 posts of each section/category. At the end of the step 3 I got the next message:
INSERT INTO wp_term_relationships (object_id, term_taxonomy_id) VALUES (’4′, ‘3′)
Query failed
Anyone knows a solution to fix it?.
Thanks in advance.
ps: sorry for my bad english.
@Matias - This is due to special characters (curly quotes, etc.) in the post title.
I’m having the same problem, only I noticed the script also truncates posts if there’s any special characters in there as well.
This is incredibly problematic, seeing as how I’m converting 800 posts and having this problem with also every story.
Thank you so much.
Worked like a charm on j1.013 to wp2.7 !!!
—> BUT, is there any way I can bring over users as well ? Doing this by hand is out of the question since I have a lot.
Again, thank you so much for your work, it’s majorly appreciated
[...] posts from Joomla was very fast and easy thanks to the Joomla2Wordpress Import Wizard. Static content were not imported and I had to copy-and-paste the content into Wordpress manually, [...]
perfectly worked with wp 2.7, but not working with wp 2.8
I had to change the query at line 379 of index.php to be this:
$query = “INSERT INTO “.$wptblprefix.”posts ( post_author, post_title, post_content, post_date, post_modified, post_name, post_category, post_excerpt, to_ping, pinged, post_content_filtered) VALUES ( ‘$ID5′, ‘{$import[1][$j]}’, ‘{$import[2][$j]}’, ‘{$import[3][$j]}’, ‘{$import[4][$j]}’, ‘$post_name’, ‘$wpsection’,”,”,”,”)”;
and then it worked without error messages for me. I am running Joomla 1.5.11 and wordpress 2.7 and I had been getting the “Query failed inserting Section” error. This suggestion is as-is; back up your db first and use this mod at your own risk. thx
anyone have luck getting this to work with wordpress 2.8? i’m a total hack at this stuff but looking at the index.php file, still can’t figure out why it isn’t working.
Not working with Wordpress 2.8.
I get a:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘xxxx’@'xxxxx’ (using password: YES) in /home/xxxx/public_html/site3/export/index.php on line 233
It seems like Wordpress is not accepting connections, but I know username and password are ok.
Thank you for the great work, I’m considering installing Wordpress 2.7 and then upgrade.
Regards,
MG
Salam.
I try this script, but get:
——————————–
Importing 29 items
SELECT ID from wp_users WHERE wp_users.user_login = ‘admin’
INSERT INTO wp_posts (id, post_author, post_title, post_content, post_date, post_modified, post_name, post_category) VALUES (”, ‘1′, ‘Ilmu Ikhlas’, ‘
-CONTENT HERE-
‘, ‘2007-01-20 15:29:56′, ‘2007-01-23 15:54:10′, ‘ilmu-ikhlas’, ‘11′)
Query failed inserting Section
——————————–
Can you give solutions?
Thanks, brother.
Salam.
I try this script, but get:
——————————
Importing 29 items
SELECT ID from wp_users WHERE wp_users.user_login = ‘admin’
INSERT INTO wp_posts (id, post_author, post_title, post_content, post_date, post_modified, post_name, post_category) VALUES (”, ‘1′, ‘Ilmu Ikhlas’, ‘
-CONTENT HERE-
‘, ‘2007-01-20 15:29:56′, ‘2007-01-23 15:54:10′, ‘ilmu-ikhlas’, ‘11′)
Query failed inserting Section
——————————
Can you give solutions?
Thanks, brother.
I got the message “Query failed inserting Section” too. To solve it I had to change line “$query = “INSERT INTO” in the index.php script because the field post_category doesn’t exist anymore.
Now the insert command should be:
$query = “INSERT INTO “.$wptblprefix.”posts (id, post_author, post_title, post_content, post_date, post_modified, post_name) VALUES (”, ‘$ID5′, ‘{$import[1][$j]}’, ‘{$import[2][$j]}’, ‘{$import[3][$j]}’, ‘{$import[4][$j]}’, ‘$post_name’)”;
in case the message persists, you can add the Sql Error message changing the “die command” to:
die(”Query failed inserting Section”. mysql_error());
hope it helps
I’m a noob so forgive the obvious questions:
I have a website with Joomla 1.5 and would like to change it to WordPress.
1. Do I need to install WordPress on my Joomla site ahead of time, or does this script do that for you?
2. If I need to install WordPress ahead of time, is this the best approach:
a. Create a WordPress database and user (along side my Joomla database). (I can do this using the cPanel or myPhpAdmin, which are available when I log into my Joomla site.)
b. Install WordPress 2.7 manually by uploading the contents of the WordPress directory to the “root directory” of my website. (I assume the root directory of my website is …/public_html/) If I do this, I’ll end up with a mix of WordPress and Joomla folders and files, all under /public_html/. Is that problem? Do I just need to later go through and manually delete the Joomla folders and files?
3. For step 3 - “Upload files to /export on your server.” - Do I create the export directory in the “/public_html” directory? (Alongside all the existing folders for Joomla - administrator, components, includes, etc. - and WordPress - wp-admin, wp-content, etc.?
That’s it for now. Thanks for any pointers.
[...] skripto Joomla2Wordpress, ki naj bi poenostavila migracijo. Ker ni delovala, sem poskusil še Joomla2Wordpress Import Wizard v.3. Skripta je sicer uspešno prenesla članke, a brez šumnikov. Med komentarji sem našel rešitev [...]
[...] coming. I finally made the transition to Wordpress from my joomla site with a little help from this nifty script. My site is essentually a `blog´as they call it so I thought I would start using the best blogging [...]
Great job.
wp-config.php not found : if your wordpress is in a subdirectory simply edit index.php et search et replace all “../” by “../yourdirectory”
connect error : many times a error in dbhost name
Query failed inserting into categories for every option I try on your script.
[...] uso del Script Joomla2Wordpress te facilitará enormemente el cambio siguiendo los siguientes [...]
Thanks you so much.
This is a great blog post,
i have learnt a lot.
Hello.
I’m tring to get working your script:
but still having problems whith articles that have special characters.
so… is there a query to execute .. so that I can change special characters form the “Title” of Joomla Articles:
é è ë ê -> e
ä â -> a
thank you very much ^^
[...] coming. I finally made the transition to Wordpress from my joomla site with a little help from this nifty script. My site is essentually a `blog´as they call it so I thought I would start using the best blogging [...]
THANKS A MILLION TIMES!!!
- I just imported all categories from joomla 1.0 (Legacy!!) to Wordpress 2.8.3.
Only “setback” was the ‘Query failed’, which is Antoniazi already addressed above.
In this regard, I’d just like to add that the
$query = “INSERT INTO “.$wptblprefix.”posts (id, post_author, post_title, post_content, post_date, post_modified, post_name) VALUES (”, ‘$ID5′, ‘{$import[1][$j]}’, ‘{$import[2][$j]}’, ‘{$import[3][$j]}’, ‘{$import[4][$j]}’, ‘$post_name’)”;
command has to be replaced in index.php TWICE - once for section importing and once for category importing.
Other than that, it went flawless!! For the record, I did this on the same DB, with wordpress in a sub-folder.
After this, I’ll be exporting normally from WP and into another DB, on another host.
Thx again!
[...] my teeth and tearing my hair out all summer, I finally said “screw it,” located a Joomla-to-WordPress importer (Joomla being our original sucktastic CMS, powering the current site), and had the new WP site more [...]
Hello I keep getting this error!
Can someone help please
I do everything as it says, and when I click and choose the category.
this is what I get:
=====
on top of the page
=====
Step Three
Importing 234 items
SELECT ID from wp_users WHERE wp_users.user_login = ‘admin’
INSERT INTO wp_posts (id, post_author, post_title, post_content, post_date, post_modified, post_name, post_category) VALUES (”, ‘1′, ‘Closing reception new to OTC’, ‘
====
and the bottom!
====
Query failed inserting Section
——————————–
what should I do?
@Fast4u;
See my previous reply (Aug 5th) and also Antoniazi’s reply.
- I’m fairly sure you get that error because the script is trying to execute SQL inserts into a table that no longer exists; ‘post_category’.
I’m assuming you’re importing into a recent version of WP?
Hope it helps!
Casper,
Thanks for the quick reply!
Yes Version 2.8, So I should just edit the code, and remove after post_name, “post_category”.
And that should solve the problem?
@Fast4u;
Copy/paste this;
Line 379;
$query = "INSERT INTO ".$wptblprefix."posts (id, post_author, post_title, post_content, post_date, post_modified, post_name) VALUES ('', '$ID5', '{$import[1][$j]}’, ‘{$import[2][$j]}’, ‘{$import[3][$j]}’, ‘{$import[4][$j]}’, ‘$post_name’)”;Line 507;
$query = "INSERT INTO ".$wptblprefix."posts (id, post_author, post_title, post_content, post_date, post_modified, post_name) VALUES ('', '$ID5', '{$import[1][$j]}’, ‘{$import[2][$j]}’, ‘{$import[3][$j]}’, ‘{$import[4][$j]}’, ‘$post_name’)”;NB: Make sure that the single quotes aren’t escaped/re-formatted to backticks! (I had that problem the first time, when i copy/pasted from here)
Good luck
Casper,
I did what you said! And this is what I get
++++++++++++++++++++++++++++++++
top
++++++++++++++++++++++++++++++++
Step Three
Importing 234 items
SELECT ID from wp_users WHERE wp_users.user_login = ‘admin’
INSERT INTO wp_posts (id, post_author, post_title, post_content, post_date, post_modified, post_name) VALUES (”, ‘1′, ‘Closing reception new to OTC’, ‘
++++++++++++++++++++++++++++++++++++
bottom
++++++++++++++++++++++++++++++++++++
‘, ‘2008-05-02 10:07:40′, ‘2008-05-02 10:08:10′, ‘closing-reception-new-to-otc’, ‘6′)
Query failed inserting Section
++++++++++++++++++++++++++++++++++++
and this is what i changed in my index.php file
http://img198.imageshack.us/img198/4139/379line.gif
http://img22.imageshack.us/img22/1728/line507.gif
Please advice,
Thanks again!
What do I do wrong?
I’m so tiered that my eyes are shutting down. Can anybody help me?
http://www.stage-suriname.com/export
i tried to put the lines from the last post in there, but when I do that it just turn blank.
Wordpress 1.8.3 and Joomla 1.5x.
I hope sombody could help me!
Hello i have an error with querys in category:
Importing 2 items
SELECT ID from bm_users WHERE bm_users.user_login = ‘Hades87′
INSERT INTO bm_posts (id, post_author, post_title, post_content, post_date, post_modified, post_name, post_category) VALUES (”, ‘2′, ‘Concierto de Las Furias.’, ‘
‘, ‘2009-02-11 13:08:57′, ‘0000-00-00 00:00:00′, ‘concierto-de-las-furias’, ‘3′)
Query failed inserting into categories
In the 3 step i recived this error, query failed into categories and i don’t know wjat to do! thanks for all
I just want to move from joomla to wordpress, i will give it try
Thanks, i need
I want to move from joomla 1.0.12 to Wordpress 2.8.4.
I have to modify the two lines of the script as shown by Casper.
Before I run the script have I to create sections and categories in WP ?
If I do so the articoles will go in the right section / category ?
Thanks for your reply.
I’ve uploaded the files in:
http://www.nonsolomac.com/wp/export/ but
When i digit:
http://www.nonsolomac.com/wp/export/index.php
I get:
Parse error: syntax error, unexpected ‘>’ in /web/htdocs/www.nonsolomac.com/home/wp/export/index.php on line 381
Samthings wrong ?
@hiroshi;
Look for a missing ? (question mark), probably at the end.
Either that, or compare the line from the original file.
And yes, you need to create categories in Wordpress, before doing the import - which just happens to be great, if you wanted to merge categories
I confirm it works flawlessly on WP 2.8.4 install.
@hiroshi;
Look for a missing ? (question mark), probably at the end.
Either that, or compare the line from the original file.
And yes, you need to create categories in Wordpress, before doing the import - which just happens to be great, if you wanted to merge categories
I can confirm it works flawlessly on WP 2.8.4 install.
Thanks Casper for your reply.
A missing question mark ? Where ?
The line 379 and 507 of the original index.php file has no question mark.
… and no question mark for the line 381, the line indicated in the message error.
[...] mooi werken, dus dan maar even zoeken hoe ik mijn artikeltjes kan importeren in WP. na ff zoeken gevonden config aangepast geupload en importeren [...]
I’ve checked again.
Everything seems to be OK.
I can’t go on.
Help, Help !
Casper, are you there ?
Thanks
@Hiroshi and everyone else;
I just uploaded my modified version of the index.php file.
I can confirm this one works flawlessly, with the latest WP install (2.8.4).
http://www.mediafire.com/?sharekey=9836bf5b19d22007d6baebe61b361f7ce2e801bfdbf2d453b878de785cc0f59e
Everybody should grab this one, and REPLACE it with the default index.php, included in Azeem’s original script.
If this file does not work for you, the error is not with the script/file - you should check your config.php, general DB settings etc.
Best of luck!!
Casper
Thank’s Casper. I think I will put out a new version of the attachment and give you all the credit for the latest updates
Do you know which version this updated code will work with and which old versions it won’t work with due to schema changes in WP ?
@Azeem;
No problem – I’m the grateful one
Thanks so much for writing the script, it was literally the only way for me to successfully port a legacy 1.0 Joomla to a fresh, clean, WP!
BTW, you should really credit Antoniazi’s - I only did what he wrote
I don’t know which WP version the schema change applies to, but it can probably be found on the Codex somewhere in the changelogs..
Thx again!
@Casper,
Right… Special thanks to Antoniazi and Casper on the assist
Thank you very much Casper.
I’ve uploaded the new index.php file.
Now I get this message: “There doesn’t seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn’t work for all server setups. The safest way is to manually create the file.”
Changing config.php in wp-config.php or creating an empty file wp-config.php doesn’t fix the problem.
@Hiroshi,
you have to do a clean installation of wordpress to use this script. that file is part of the wordpress installation.
@Hiroshi;
Actually, the fault is on my part.
I initially changed the default path to Wordpress’ wp-config.php, simply because I had WP in a subdirectory.
I uploaded my modified index.php again, this time with the default file path, as originally set by Azeem.
Grab the file here; and once again, REPLACE it with the default index.php, included with the download.
Azeem; could you maybe change my previous link above to match this one?
@Hiroshi;
Actually, the fault is on my part.
I initially changed the default path to Wordpress’ wp-config.php, simply because I had WP in a subdirectory.
I uploaded my modified index.php again, this time with the default file path, as originally set by Azeem.
Grab the file here; http://www.mediafire.com/?wkneqm23mjj and once again, REPLACE it with the default index.php, included with the download.
Azeem; could you maybe change my previous link above to match this one?
Casper, your link is not working.
On another note:
I got some of the things converted but it seems my articles are cut off. The script only imports so much of each article.
Anyone have a work around for this issue?
Thanks!
Hmm… For some reason, my earlier comment wasn’t posted;
@Hiroshi;
Actually, the fault is on my part.
I initially changed the default path to Wordpress’ wp-config.php, simply because I had WP in a subdirectory.
I uploaded my modified index.php again, this time with the default file path, as originally set by Azeem.
Grab the file here; http://www.mediafire.com/?wkneqm23mjj and once again, REPLACE it with the default index.php, included with the download.
Azeem; could you maybe change my previous link above to match this one?
Thank you very much Casper !
Now I’m one step ahead.
The new index.php and the file config.php are online.
I’ve correctly modified config.php with my data.
I get the first page from the script.
I click the “Step One” link and i Get:
Warning: mysql_connect() [function.mysql-connect]: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) in /web/htdocs/www.nonsolomac.com/home/wp/export/index.php on line 124
Could not connect
Everything seems to be OK, but I get this error.
What have I to do ?

i’m trying to migrate from joomla 1.0.15 to wordpress 2.8.4 but every time i get to step 5 i get “Query failed inserting in to category”, or “section” if i select section”. I even tried upgrading to joomla 1.5.14, but i still get “Query failed”. i tried the index file that Casper posted on the 2nd but it still doesn’t work. the code produced looks good so i don’t know what’s up. any ideas?
Hi,
FINALLY WORKING. So for info I ran Joomla! 1.5.14 and Wordpress 2.8.4.
I had “Query failed” on step 3 for any importations.
What I did in index.php:
Removed “post_category” AND ‘$wpsection’ in line 379, AND line 507.
My articles got imported perfectly in my categories.
What a relief !
Good luck!
Alex.
Actually one last problem: Posts that have special caracter in title such as “é”, “è” ..etc don’t import and end up with a “Query failed”. If anyone knows how to solve this pleeease tell us.
confirmed; removing ‘post_category’ and $wpsection works, and you also need to do the same thing for ‘link_category’ if you want to import links.
so that worked for text, any idea how to import images? and change the links in the text?
I am moving to a new ISP, I would assume you can not use this importer to go across domains to another site?
What files should I copy to a directory on my new ISP?
@splat: unfortunatelly I can’t confirm this. I’d like to migrate from J 1.0.15 to WP 2.8.4.
In Step 3 after chosing WP category the script seems to fail; without any error message or any other message. I see a blank page in my browser only with the header: “Joomla2WordPress Import Wizard v3 by Azeem Khan”
I’ve made the modification you mentioned (in row 379 and 507) but the result is same…
MySQL ver: 5.0.32
Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 PHP/5.2.0-8+etch11 mod_perl/2.0.2 Perl/v5.8.8
Any other experience like this?
[...] Dus, .. een alternatief zoeken. En dat alternatief is er: de Joomla 1.x site converteren naar een WordPress website. WordPress heeft daar zelf geen tools voor, maar er zijn wel mensen die er actief mee bezig zijn geweest. Er bestaat een uitstekend script voor op dit moment. Inmiddels is er een 3e versie beschikbaar, zie deze link. [...]
Ok all you gurus, I’m a 50 year old mom trying to move from mambo to word press. I would be so grateful if you guys would help me out.
My dbs are not on the same host. I use go daddy hosting (don’t laugh). They say I need to buy virtual server, so that all dbs will be on the same host???
So far, I tried all three versions. I get query failed. Version 3 wouldn’t work at all after I changed line 379 and 507.
So can I use this script or do I have to do what go daddy recommended?
Thanks for the great plugin!
I get \r\n when i import the content to wordpress and that give me a break like … How can i delete \r\n in the importscript?
Azeem thanks for the information. I just want to try to change my joomla to wordpress. I bookmark this page. Thanks, nice to meet you.
I’ve still the same problem:
I click the “Step One” link and i Get:
Warning: mysql_connect() [function.mysql-connect]: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) in /web/htdocs/www.nonsolomac.com/home/wp/export/index.php on line 124
Could not connect
Everything seems to be OK, but I get this error.
What have I to do ? Help !
I just tried to run this for my Joomla 1.0.15 site to migrate to Wordpress 2.8.6 and it failed.
Error I got was: Query failed inserting into categories
Is there any help for this?
Thanks!
I just tried to run this for my Joomla 1.0.15 site to migrate to Wordpress 2.8.6 and it failed.
Error I got was: Query failed inserting into categories
Is there any help for this?
BTW I am trying to import into a subfolder.
My main site is in root and I installed Wordpress in a folder called /wp/ so that I don’t have downtime for my site.
Thanks!
i tried with joomla 1.0.15 and wordpress 2.8.6 and wordpress 2.7 - Query failed…
Hi all,
I have imported many articles and categories successfully, but now I have a need to import more articles and categories. I am wondering if anyone knows how to edit this script to import only categories and articles that don’t already exist.
I know a little SQL and I’ve had a look at the script. It looks like lines 379 and 507 are the two INSERT statements that are doing the actual import into the WP database. I am guessing (with my limited knowledge) that it would be possible to add a WHERE statement to these to check for duplicate post and category titles. Is this possible?
Example: INSERT INTO the wp db WHERE joomla article title is not equal to wp post title.
If anyone can help with this I would be very grateful. Please contact me at awarner20 AT yahoo if you’re interested.
Hi,
I had same import problem with WP 2.8 too.
I changed the insert query in index.php like that:
$query = “INSERT INTO “.$wptblprefix.”posts (id, post_author, post_title, post_content, post_date, post_modified, post_name, post_status) VALUES (”, ‘$ID5′, ‘{$import[1][$j]}’, ‘{$import[2][$j]}’, ‘{$import[3][$j]}’, ‘{$import[4][$j]}’, ‘$post_name’, ‘publish’)”;
It works with my site import.
hi
I get the “Query failed” error aswell.
I changed all instances in the index.php of wp_ to wpeco_ as I have more than one wordpress installation in the same database.
Any idea why this is not working???
Running wp 2.8.5 and 1.5 on joomla..
cheers mat
[...] you can indeed. Have done this twice before with little fuss. Something to look into: Joomla2Wordpress Import Wizard v.3 __________________ Web Design [...]
For everyone using 2.8.4 getting errors do this:
download the files
Then download this file and replace index.php
http://www.mediafire.com/?wkneqm23mjj
and also make this code change:
http://azeemkhan.info/2008/joomla2wordpress-import-wizard-v3/#comment-21848
I will setup the download link for versions past 2.8.4 with a seperate set of files so its easier for people on the newer versions on Wordpress.
You could always get an older version of WP, use this script to import and then upgrade to the latest WP version.
[...] ben de hortlatacam kusura bakmayn Bu eklenti ile Bu eklenti ile Joomla 1.0.x versiyonundan gei yaplabiliyor. Joomla 1.5.x versiyonunda sorun [...]
ohhhhh I didn’t read the entire thread, specially Azzem on December 16th, 2009 at 9:04 pm :-/
I’m running 2.9, and joomla 1.5.15
As it didn’t work for me I did this;
-Installed wp 2.3 as a migration wp
-Ran the migration script
-I had a issue (only one post) with a special char in one title, I remove it and ran again with success
-Upgraded wp2.3 to 2.9 (db as well)
-Exported
-Imported in the target wp the generated eXtended RSS (WXR) file
that’s it, it worked out
I need just edit some entries images.
Hi Azeem
Thank you for the fine script. All went well with migrating from Joomla 1.0.15 to Wordpress 2.8.4. However, is there any way to get rid of Joomla’s ‘mosimage” which is in every article in my newspaper’s website?
Thanks and happy 2010
I have an issue which no one else seems to have had… im running joomla 1.5.15 all database settins are correct, however in step 1 it wont populate the drop down forums with the categories / sections / links
Any help on this one?
No go for me. I’ve downloaded the latest index.php file and I still get a Query Failed in step two. I’m trying to go from Joomla 1.0.8 to WordPress 2.9 and I just can’t get it to work.
I see Pablo’s comment above about installing wp2.3 as a migration wp. Where would I find that? Perhaps I can try it thath way.
Thanks.
correction: I’m trying to go from Joomla 1.0.12 to WP 2.9
Step One
Okay, we’re connected to the Joomla database.
Now, we need to select the method you want to use to import your articles or links. (You should automatically advance to the next step, but if it doesn’t you can click the button.)
Import articles from a whole section:
Import articles from just one category:
Import links from just a category:
When I went to step 2 I get this screen:
Joomla2WordPress Import Wizard v3 by Azeem Khan
Step Two
Could not select database
I am trying to Import from Joomla 1.5.9
to
WP 2.8.6
When I first started to import th script told me it could not find the wp-config.php file so I copied it to the export folder. and then it went ok to step 1, and stopped at step 2 as per above
Step Two
Could not select database
WHERE do I put the Export Folder????
Thanks,
Arthur
Followup - I imported each category separately and this seemed to work but I got a few categories which gave a query failed part way through. My guess is there was an illegal character somewhere that choked things. Not sure why this happened but in this case it wasn’t the end of the world, just meant I will need to manually import the posts in that category that it didn’t get.
I did notice that for some other posts it only imported part of the post. At first I thought it was just showing the short abbreviated version of the post but in several occasions I found that only part of the post imported (and these were posts from categories that supposedly imported correctly). Again not sure why this happened.
I also noticed something else pretty critical.. this doesn’t import comments.
Oh and having it import attached photos etc would be a great addition too.
In my case I guess i’m going to need to manually copy every post over to make sure it gets everything, or find another tool that will get the comments etc.
Thanks again for providing this, please keep up the good work.
@ Casper & Azeem
I have this problem:
after the click on “Step One” i have this message:
Warning: mysql_connect() [function.mysql-connect]: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) in /web/htdocs/www.nonsolomac.com/home/wp/export/index.php on line 124
Could not connect
What have I to do ?
What do you think about this message ?
Is the problem in the settings of the file ?
I have Joomla 1.0.12 and now Wordpress 2.9.
Yes, in the meantime I have uploaded, just a day before you posted the last version of the file index.php.
Help, help, help !