I imported a WordPress blog that kept all my entries but lost all my Categories, Tags, and custom fields. I have a backup o开发者_如何学Gof the MySQL database that contains that info. What kind of MySQL query do I need to fetch/export all that metadata from my backup db, and then import it into my new one?
I would copy the wp_term_relationships, wp_term_taxonomy, wp_terms, and wp_links tables. Probably wp_postmeta too. Comments are in the wp_coments and wp_commentmeta tables. You can just export these tables in their entirety and import the data into your new database.
I think in general, if copying one site to another, you can copy all tables except the wp_options table. This is where the site configuration is stored, and that can cause problems when moved from one site to another.
精彩评论