More and more people using WordPress as CMS nowadays and replacing systems like Joomla on their website. Marco from solariz.de 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_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.
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.
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