Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon Can I use different database prefixes for each site in a multisite network


Can I use different database prefixes for each site in a multisite network


In a WordPress multisite network, each site does indeed use a different database table prefix, allowing them to share the same database while maintaining separate data. By default, the main site uses the prefix `wp_`, and additional sites are assigned prefixes that include their unique site ID. For example, if the main site is `wp_`, the second site would have tables prefixed with `wp_2_`, and so on for other sites in the network[2][3].

However, while you can customize the table prefixes for each site, all sites within a multisite network must still reside within the same database. This means that while the table names will differ due to the prefixes, they cannot be completely separate databases for each site unless you opt to set up individual WordPress installations instead of a multisite configuration[1][3].

In summary, you can use different table prefixes for each site in a multisite network, but they will all share the same database. If you require completely separate databases, you would need to create multiple standalone WordPress installations.

Citations:
[1] https://wordpress.org/support/topic/wp-multisite-different-db-rather-than-prefix/
[2] https://paulund.co.uk/get-database-table-prefix-in-wordpress
[3] https://docs.wpvip.com/wordpress-on-vip/multisites/database-structure/
[4] https://wpmultisitedomainreplace.com/faq
[5] https://wordpress.stackexchange.com/questions/264942/one-admin-for-2-wordpress-websites