Comments (9)
I agree with @danielbachhuber that to make the best decision here we should list the pro/cons.
My current use-case is:
I am currently working with the WP-API plugin on a 30+ site multisite network. Ideally, I would like to "network enable" the WP-API functionality. Reasons being:
- The WP-API brings a whole new (and I might say BETTER way) of displaying and updating content data across sites in a Multisite environment.
- WordPress Multisite feels like the forgotten wicked step-child that never gets the love and attention given to the first-born WordPress core.
- I am lazy and don't want to have to activate the plugin on a per-site basis (that is what network activation is for).
- The plugin will automatically be enabled when new sites are added.
- I can keep the plugin "hidden" from the per-site plugin list, so a single site admin won't accidentally disable it.
I would love to hear how others are using or planning on using this plugin, and the cons against allowing the WP-API functionality to be network enabled.
from wp-api.
So, the question is, do we want a per-site API, or one for the whole network? I'm inclined to lean towards the latter, similar to how WP.com uses public-api.wordpress.com for all the sites. Once we have #40, it's then cheap and easy to point to the correct one.
from wp-api.
You'll want to do a detailed list of the pros and cons for each approach. In my opinion, the biggest failing of the WPcom API is that it doesn't load the context of whatever blog the request is for. No custom endpoints, etc etc. It basically makes the API a non-starter for anyone who wants to hack on top of it
The advantage of a single endpoint for all blogs is for third-party services that don't want to deal with connecting to a bunch of domains.
from wp-api.
You'll want to do a detailed list of the pros and cons for each approach. In my opinion, the biggest failing of the WPcom API is that it doesn't load the context of whatever blog the request is for. No custom endpoints, etc etc. It basically makes the API a non-starter for anyone who wants to hack on top of it
The current multisite plugin uses switch_to_blog()
, so it should be able to offer per-site custom endpoints. (The multisite plugin needs love, incidentally.)
The advantage of a single endpoint for all blogs is for third-party services that don't want to deal with connecting to a bunch of domains.
We're going to need that anyway, but #40 should make connecting easy. This is more about making it easier for network admins to manage, since bringing them altogether means that they can be centrally controlled easier. Whether this is really an issue or not, I don't know.
from wp-api.
The current multisite plugin uses switch_to_blog(), so it should be able to offer per-site custom endpoints.
Sure, but switch_to_blog()
doesn't load a plugin that Site B is running when the requests are proxied through Site A. It's fairly common to have a plugin (or theme) running on one site, but not another.
from wp-api.
Registering an un-grokked opinion here. I'd be happier using a per site API rather than one attached to the primary site on a network (or primary network on a multi-network setup).
from wp-api.
@rachelbaker Is there anything else you'd like to add here? I noticed that in #49, you didn't say it fixed this issue, so left this open for now. :)
FWIW, after more indepth use of multisite recently, I'm +1 on per-site. Per-network is cool, but that's something that'll only be needed in specialised cases, from what I can see.
from wp-api.
@rmccue Let's close this issue for now, if there is anything else I would like to add I will open a new issue.
from wp-api.
Hi, not sure if this has been answered, but I'm also more on per-site API regarding multisite.
from wp-api.
Related Issues (20)
- urldecode for slug HOT 1
- Can i extract in JSON FORMAT for mobile app? HOT 2
- 2u8mqg HOT 1
- Output rendering problem HOT 1
- Make a new query with a specific link HOT 1
- register_rest_field update_callback not work HOT 1
- Unable to post users HOT 1
- How to access superagent's request obj? HOT 2
- Get URL/File of an embedded video HOT 1
- Wordpress-Api HOT 1
- Custom fields and query in url HOT 1
- pass utf-8 characters to url HOT 1
- Rest Api Visual Composer HOT 1
- Want display all parent categories with first level child HOT 1
- want to display all parent category with first level child HOT 1
- unable to get url parameters HOT 1
- /wp-json/wp/v2/posts and /wp-json/wp/v2/posts doesen't work. HOT 1
- Error on UTF8 encode HOT 1
- Error on UTF8 encode HOT 1
- Custom post type filter parent_post not working in wp rest api HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wp-api.