I have a WordPress Multisite which includes a Demo website. The demo website database has to be restored hourly to a snapshot.
It's easy to do for the whole Multisite, I just export the whole database as an SQL. How can I export only the specific demo site?
I see that some WordPress tables like Users and Posts are mixed, which seems to be an issue.
I have a WordPress Multisite which includes a Demo website. The demo website database has to be restored hourly to a snapshot.
It's easy to do for the whole Multisite, I just export the whole database as an SQL. How can I export only the specific demo site?
I see that some WordPress tables like Users and Posts are mixed, which seems to be an issue.
Share Improve this question edited May 11, 2020 at 13:28 bueltge 17.1k7 gold badges62 silver badges97 bronze badges asked May 11, 2020 at 13:10 Stefan SStefan S 192 bronze badges1 Answer
Reset to default 0ID of a site
The data from a site inside a Multisite network are stored in separate tables of the database. Check the ID of the site in your back-end:
Network --> Websites
Now mouse over, hover effect, about a edit link and you find the ID of the site inside the link /wp-admin/network/site-info.php?id=123
Tables
Each table with this ID inside the name is for this site, like wp_123_posts
.
Plugin hint
It gives also several plugins there have this as solution for easy to use, like 'BackWPup' or similar. The ID of the site is also easier to find with a helping tool. Also, here you should find plugins, like 'Multiste Enhancements'.
Multisite Only Tables
The following tables are created during the network installation to help manage the network:
- wp_site
- wp_sitemeta
- wp_blogs
- wp_blog_versions
- wp_signups
- wp_registration_log
Updated tables
The wp_users
and wp_usermeta
tables become global across the subsites in the network
Site specific tables
After the prefix you find the ID if the site inside the table name, like wp_123_posts
.
- wp_commentmeta
- wp_comments
- wp_links
- wp_options
- wp_postmeta
- wp_posts
- wp_terms
- wp_termmeta
- wp_term_relationships
- wp_term_taxonomy