简体   繁体   中英

Moving data from custom blog to Wordpress?

Ok so i have this custom blog that i now need to move over to wordpress. I tried using the import features in wordpress but that didnt work as planned. The custom blog is written in php and has a userscomments table, authors table, and posts table. Is there an easy way to move all these posts over to wordpress and preserve all the comments per post.

If the custom blog doesn't have an export function that will dump its data into a format WordPress can read, then it may be that you'll have to roll your own. There are 2 approaches:

  1. Do a database-only import, using code or SQL tools along with information from the WordPress Codex entry on the WP database . This will probably be fairly simple from a coding standpoint, but you have to make sure you get it right.
  2. Use the WordPress API to create the posts based on the output from the old system. This will involve a bit more learning, but it's the Right Way™ to do it, and means that you learn the WordPress API rather than the database structure.

If I were doing it myself, I'd choose option #2.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM