james
james

Reputation: 73

Is it possible to Import the 'Posts' only Table to a New Database?

I have a problem with my current WordPress site my only solution was to renew everything but posts. I have exported the whole SQL file and the home directory file of that website. I created a brand new website but the same domain and created a new database.

I want to import only the posts table. is that possible? How to work on it?

Upvotes: 0

Views: 3104

Answers (1)

Salmaniac
Salmaniac

Reputation: 309

If all you want to do is import Posts from one WordPress site to another, then there's an in-built tool in WordPress to do that.

Go to your original site's WordPress admin dashboard. And under Tools menu, you'll find Export option. Here you can select what you want to export. Choose the Posts option.

And after you've exported and downloaded the Posts backup, you need to go to your new site and go to Tools > Import (choose WordPress option here). Once the process is complete, your posts will be imported into your new WP site.

But if you don't have access to your original site now and want to import manually only a specific table from your SQL database, look for something like wp_posts table in your database, and only import that table into your new database. If you want to include the post metadata too, then also import the wp_postmeta table.

There are many other things associated with posts, like tags, categories, comments, comment meta, etc. If you want to include any of these, then you also need to import their tables.

Refer to WordPress Codex for a better understanding of what each table in the database holds: https://codex.wordpress.org/Database_Description

Upvotes: 2

Related Questions