I have been developing my WordPress site on a development local server.
I would now like to move the site to my production server.
I don't need any of the dummy data that I have generated while testing on my development server (posts, users, etc.). However, I do need anything that has to do with the design of the website (pages, widgets, etc.).
Originally, I tried simply clearing all tables in the database that weren't wp_options
. However, I noticed that there are rows in wp_posts
(eg: post_type: page), wp_postmeta
, wp_term_relationships
and wp_term_taxonomy
that aren't related to user generated content like posts but rather with the display of the site.
Are there any simple, recommended ways to go about clearing all of this "non-display" data from my database?
Possible approaches:
1) Delete directly from my database with the help of inner join
s (where post_type
equals "page" or "nav_menu_item" or "attachment").
2) Use the Dashboard to delete posts, users and comments.