Joomla to WordPress – Content Converter!

More and more people using WordPress as CMS nowadays and replacing systems like Joomla on their website. Marco from provides a handy script to convert your Joomla content to your WordPress installation.


One Click Solution?

No, for sure not. This process is not just click and done. Users, who don’t have any experience with PHP shouldn’t try it out and rather ask someone who has some knowledge of PHP.

How to use the converter?

First adjust the config.php and upload all files to your webserver.

* Configuration for your Database and stuff

$SQL['HOST'] = "sql.lan";   // Normaly localhost
$SQL['USR'] = "DBUser";
$SQL['PWD'] = "12345678";

// Joomla realted ->
$SQL['JOOMLA_DB'] = "solariz_de"; // Database name of Joomla
$SQL['JOOMLA_PRE'] = "jos_";    // Table Prefix of Joomla Tables

// WordPress realted ->
$SQL['WP_DB'] = "solariz_wp"; // Database name of WordPress
$SQL['WP_PRE'] = "wp_";       // Table Prefix of WordPress Tables

$DEFAULTS['POST_AUTHOR']   = 1; // User ID of target Author (1 usualy admin)
$DEFAULTS['POST_CATEGORY'] = 5; // I suggest to create a category named e.g. Import

The possibilities for adaptation are indicated by the comments. It is important that POST_AUTHOR and POST_CATEGORY ID`s in WordPress exist. So first create a blank WordPress installation. Ideally, without any content so there won’t be any conflict. Now create a category and a user and put in their ID`s in the config.php of the converter. For example user ID 1 (usually admin) and a category called “Import” with the ID 5.

The converter finds all the Joomla Article belonging to this category. If you have many categories in Joomla you can limit the using query in index.php to select just certain articles of a specific category, and then you can run the script once for each category.

In index.php at line #46, you can find the responsible query to read the articles:

// WHERE `sectionid`='1'
$query = "SELECT * FROM `".$SQL['JOOMLA_PRE']."content` ORDER BY `created`";

Here you can, as mentioned above, add a WHERE statement to limit the selecting articles.

WordPress uses multiple tables in order to save the entries. In order to avoid a conflict, you should ensure that all articles in the target WP installation are previously deleted.

The Conversion

After you adjust the script to your settings, you can run index.php . If you have any suggestions for a better solution or better code, please leave a comment and Marco will try to implement the improvements.

You can download the Script at the bottom of his German article. Alternativ, but not under maintenance: very simple converter Script helping to migrate Joomla to WordPress





17 responses to “Joomla to WordPress – Content Converter!”

  1. […] alla ni som inte tycker att systemet fungerar riktigt så bra som det borde, här är lösningen. Konvertera till WordPress med några SQL-strängar. “Men WordPress är ju för bloggar?!” “Jag behöver […]

  2. JoomlaSoftware Avatar

    Before this integration, I would create a custom skin for WordPress that matched the Joomla site. But creating a custom skin for WordPress takes a lot of time and it expensive for the client. It’s much easier to use CWJI.

    I am looking for more informations and Codes

  3. Sam Lowel Avatar

    Thanks for the post, i learned my leasson the hard way and lost all my old client joomla site content i wish i found this post before but oh well will build it again…
    thank you

  4. chris Avatar

    any easy way to convert a joomla template/theme to wordpress?

  5. Nazar Avatar

    Thanks for usefull post, good luck!

  6. wheeler Avatar

    As if by magic.
    Thanks this is much appreciated.
    it worked for me – importing from Joomla 1.5.14 to wordpress 2.8.4

  7. Frank Avatar

    I have some Joomla sites myself, but since starting with wordpress I want to change them, but I couldn’t find an easy way.
    I think this will help me out. It’s not a project for now, so I bookmarked your post to come back later.


  8. Alex Avatar

    This is exactly what I need thanks. But I have one problem… My login info aren’t the same for my joomla database and my WordPress one… So I cannot use the script.

  9. Michael Avatar

    Quick question: Is this an action that will end the life of the Joomla installation or will that stay intact whilst styling and additional organization of the import can occur?

    Thanks in advance for response.


  10. Scott Avatar

    Michael, Just make sure the scripts index.php doesn’t overwrite Joomla’s index.php and Joomla will be unharmed. You could rename either one.

    When the Joomla content comes to WP, it all comes in as posts. I just changed this to page in the database, is there a way to do it in WP? Also there was no GUID assigned. I can’t find a way to add one, short of manually in the database, which sounds like a chance for trouble. What are the consequences of not having GUIDs assigned to pages?

  11. kai Avatar

    same question as Alex #7 .. is there a way to convert Joomla users to WordPress while retaining the password for login? I’ve scoured the net for answers but cannot find anything.

    thanks in advance.

  12. Chris Avatar

    I have used this on smaller sites and it worked like a charm.

    I have a larger site with higher traffic and don’t want to break the backlinks that I’ve developed.

    Is there a best practice for redirecting the Joomla links to their new home on WordPress?

  13. dzone Avatar

    Hi all!
    I tried it but my prime language is Bulgarian and it transfer all stuf that is in English but Bulgarian texts look like ???? ??? Dance event ????? ??? /???/

  14. stefano Avatar

    I am not a techy guy and got get this..
    can anyone help me with a conversion? pls Chk
    and let me know the cost for the conversion..


  15. blog Avatar

    i was thinking to do it ,,is there any module or plugin to do it….

  16. Matic Avatar

    There is great plugin that does this job:
    Have just done it and it was very easy! Actually it is a single click job!

    p.s.: if anyone need theme for wordpress or other help with wordpress including migration, let me know. We ( can offer you our service…

  17. Toomas Nigola Avatar

    Thank you, Matic – this last plugin really does the trick and is super easy to use! God bless you all!