What is the way to share data between sites in a multisite

We want to display the same data on multiple sites in a multisite. This data needs to be added/edited by the client.

We can create a custom post type and use the switch_to_blog function to get the right data on each site. But isn't there a better solution?

Maybe a custom table where we save the data and get the data from. Or using the REST API to get the data from a blog or the custom table.

What would be the best solution also performance wise?

Topic switch-to-blog rest-api multisite Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.