b2evo: moving post to another blog

by prettyscripts on 2010-02-17 14:26:21

b2evolution

this refers to moving a post or page from one blog to another, within the same b2evolution installation.

i can't seem to find any interface in the back office to do this. the database needs to be updated directly, but it's not as easy as updating the blog id to the post because that's not how the schema works. the relationship is between post and categories, not post and blog.

this is high level instruction for advance users and must be done carefully! i recommend using phpmyadmin to access mysql database. it also assumes the default table prefix 'b2_'.

the destinated category

decide which category in the destinated blog to move to. look up category id in b2_categories table. if there are 2 categories with the same name, choose the one with the correct destintated blog id (which can be found via b2_blogs table).

note the category_ID.

the post

identify the post id. in backoffice post tab (or any tabs, depending on type of post), mouse over the title to show url in status bar. note the number at the end of url '...&p=[number]'. this is the post id.

update category

there are 2 tabled that needs to be updated.

edit b2_items__item table where post_ID is the number found above. edit column post_main_cat_ID to the destinated category id found above.

edit b2_postcats table. be very careful with this table because it's storing just the ids. locate the correct post in postcat_post_ID column and update postcat_cat_ID to the destinated category id found above.

Tags: b2evo, move, mysql

1 comment

Comment by some spammer @ 2010-03-02 14:11:17
Excellent list! I've learned more from this forum in about 2 days than I have at any other forum community.

edited by the author: spammer info removed. comment published as sample of comment spam. the spammer can't even tell a blog from a forum!
spammer IP: 221.206.62.150

Leave a comment


Your email address will not be revealed on this site.
PoorExcellent
note: all comments are moderated. do not spam and do not advertise. only comments relevant to the post will be published.
(Line breaks become <br />)
(For my next comment on this site)
(Allow users to contact me through a message form -- Your email will not be revealed!)