ZenphotoCMS Forum
Wordpress import - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Wordpress import (/thread-6872.html)



Wordpress import - minch - 2010-04-05

I have had wordpress and gallery on my blog for a long time now, and it has just been becoming more and more complex. I discovered ZenPhoto by accident and it's simplicity itself, I love it! Especially with the ZenPage plugin.

I wanted to bring my wordpress posts and comments over but I couldn't find anything to do that, so I wrote a couple of crude SQL export commands that allowed me to export the wp_comments and wp_posts in the format of ZenPhoto database, and directly import them. I thought I'd share them in case others where trying to do the same. Sorry if they are a bit basic but they worked for me

Keep up the great work guys!

== Posts ==

SELECT
ID,
post_title as title,
post_content as content,
"" as extracontent,
1 as show,
post_date as date,
post_name as titlelink,
1 as commentson,
"a:3:{i:1;s:0:\"\";i:2;s:0:\"\";i:3;s:0:\"\";}" as codeblock,
"minch" as author,
NULL as lastchange,
"" as lastchangeauthor,
0 as hitcounter,
1 as permalink,
0 as locked,
NULL as expiredate,
0 as total_votes,
0 as total_value,
0 as rating,
NULL as used_ips,
3 as rating_status
FROM wp_posts
WHERE post_status = "publish"
ORDER BY wp_posts.ID ASC

== Comments ==

SELECT
comment_ID as id,
comment_post_ID as ownerid,
comment_author as name,
comment_author_email as email,
comment_author_url as website,
comment_date as date,
comment_content as comment,
0 as inmoderation,
'news' as type,
comment_author_IP as IP,
0 as private,
0 as anon,
NULL as custom_data
FROM wp_comments
ORDER BY wp_comments.comment_ID ASC




Wordpress import - acrylian - 2010-04-05

Psst, I have actually an admin utility for basic Wordpress import in the works for the next release.