Importing Joomla articles to WordPress posts

Migrating the articles:
  1. Change database name my_joomla_db to your joomla database and my_wordpress_db to your Wordpress database
  2. Change http://demo.joellipman.com/wordpress/ to the full URL of your WordPress site.
  3. If post_type is to be post then append with ?p= otherwise use ?page_id=.
Articles:
copyraw
SET @CountCategoriesAlreadyEntered:=(SELECT MAX(term_id) FROM my_wordpress_db.wp_terms);

INSERT INTO my_wordpress_db.wp_terms
SELECT
	(a.id + @CountCategoriesAlreadyEntered) 'term_id',
	a.title 'name',
	a.alias 'slug',
	0 'term_group'
FROM
	my_joomla_db.jos_categories a
ORDER BY
	a.id;


INSERT INTO my_wordpress_db.wp_term_taxonomy
SELECT
	(a.id + @CountCategoriesAlreadyEntered) 'term_taxonomy_id',
	(a.id + @CountCategoriesAlreadyEntered) 'term_id',
	'category' AS 'taxonomy',
	a.description 'description',
	0 'parent',
	(SELECT COUNT(c.id) FROM my_joomla_db.jos_content c WHERE c.catid=a.id) 'count'
FROM
	my_joomla_db.jos_categories a
ORDER BY
	a.id;	


INSERT INTO my_wordpress_db.wp_term_relationships
SELECT
	b.id 'object_id',
	(b.catid + @CountCategoriesAlreadyEntered) 'term_taxonomy_id',
	0 'term_order'
FROM
	my_joomla_db.jos_content b
ORDER BY
	b.id;
  1.  SET @CountCategoriesAlreadyEntered:=(SELECT MAX(term_id) FROM my_wordpress_db.wp_terms)
  2.   
  3.  INSERT INTO my_wordpress_db.wp_terms 
  4.  SELECT 
  5.      (a.id + @CountCategoriesAlreadyEntered) 'term_id', 
  6.      a.title 'name', 
  7.      a.alias 'slug', 
  8.      0 'term_group' 
  9.  FROM 
  10.      my_joomla_db.jos_categories a 
  11.  ORDER BY 
  12.      a.id; 
  13.   
  14.   
  15.  INSERT INTO my_wordpress_db.wp_term_taxonomy 
  16.  SELECT 
  17.      (a.id + @CountCategoriesAlreadyEntered) 'term_taxonomy_id', 
  18.      (a.id + @CountCategoriesAlreadyEntered) 'term_id', 
  19.      'category' AS 'taxonomy', 
  20.      a.description 'description', 
  21.      0 'parent', 
  22.      (SELECT COUNT(c.id) FROM my_joomla_db.jos_content c WHERE c.catid=a.id) 'count' 
  23.  FROM 
  24.      my_joomla_db.jos_categories a 
  25.  ORDER BY 
  26.      a.id; 
  27.   
  28.   
  29.  INSERT INTO my_wordpress_db.wp_term_relationships 
  30.  SELECT 
  31.      b.id 'object_id', 
  32.      (b.catid + @CountCategoriesAlreadyEntered) 'term_taxonomy_id', 
  33.      0 'term_order' 
  34.  FROM 
  35.      my_joomla_db.jos_content b 
  36.  ORDER BY 
  37.      b.id; 


Importing the joomla categories to Wordpress: (still to do: sections as parent categories?)

copyraw
...still to come...
  1.  ...still to come... 
Importing Joomla jComments to Wordpress Posts:

...still to come...
Category: Wordpress :: Article: 377

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

Related Articles

Joes Revolver Map

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.