0

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.

1 Answer 1

0

ID 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
2
  • Hi Frank. Thank you for the help. Any thoughts on which tables are mixed? For example I see that the users / usermeta table is not unique. Since my plugin deals with user meta, I should backup that as well. Other than that, are there other relevant mixed tables?
    – Stefan S
    Commented May 11, 2020 at 14:19
  • I updated my answer with hints to the tables and his change or is new one. This should helps you.
    – bueltge
    Commented May 12, 2020 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.