Winflare
K2 Migration

How to migrate K2 items to Joomla content

K2 is a great content construction tool but it can be overwhelming especially for beginners and you may want to drive back. Migrating the content from K2 to native Joomla content can be a costly as there are several payed plug-in’s and extensions in the wild.

On the other side if you have access to your MySQL database via shell or more likely trough PhpMyAdmin you are in luck since there is a completely free method below.

As a first step please make a full backup of your Joomla database, seriously do a backup right now!

Now run the following SQL queries on your Joomla database.

First migrate the K2 Categories into Joomla content categories. Exchange “dbprefix” with your DB prefix.

INSERT INTO dbprefix_categories (title,alias,parent_id,published,access,extension) SELECT name,alias,parent,published,access, 'com_content' FROM dbprefix_k2_categories

Now lets migrate the posts. Exchange “yourDBname” with your database name and “dbprefix” with your database prefix.

INSERT INTO `yourDBname`.`dbprefix_content` (`id`, `title`, `alias`, `catid`, `introtext`, `fulltext`, `created`, `created_by`, `created_by_alias`, `checked_out`, `checked_out_time`, `modified`, `modified_by`, `publish_up`, `publish_down`, `access`, `featured`, `hits`, `language`)
SELECT `id`, `title`, `alias`, `catid`, `introtext`, `fulltext`, `created`, `created_by`, `created_by_alias`, `checked_out`, `checked_out_time`, `modified`, `modified_by`, `publish_up`, `publish_down`, `access`, `featured`, `hits`, `language`
FROM `yourDBname`.`dbprefix_k2_items`

And you are done.

Please let me know if this method worked for you in the comments below.

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.

Most discussed

Get your e-mail updates

Sign up and get your news fix directly to your inbox. Nothing more nothing else and definitely no spam.
Name
Email address
We won't share your e-mail or send spam