Scenario: I have a mother site example.com
which has a blog and say about 12 category. I also have 12 other wordpress site. Some in the subdomain of example.com
and some are different domains. 12 Sites represent 12 category. When I Post on a category the post should be also posted to a appropriate category site.
When I think about it I can do it via RSS and XML-RPC. But which one is the best choice for this purpose? I have to place code in the mother site for xml-rpc and child sites for RSS (using simplepie)
Here is some more Point that I have to focus:
- If i edit, delete posts on parent site the child site should be modified.
- If I use xml-rpc What is the right way to save the username and password for child sites? Does xml-rpc on wordpress supports sending hashed password?
- Using RSS is it possible to update or delete post according to mother site?
Please share your experience to help me choose the better solution. Thanks!
It really depends on where you want your focus to be. Here’s a case for and against each:
XML-RPC
It sounds like your standard process is:
In this setup, XML-RPC makes the most sense. You write a post on one site, and that site should then be responsible for pushing the content out to the category site. So XML-RPC would be enabled on your child sites but not necessarily on the main site.
You could set this up with a single plugin on the main site that ties in to the post publication hooks and inserts posts on the child sites.
Also, you can push updates to the child sites from the main site. Let’s say you publish your post and it gets pushed out. Then 10 minutes later you notice a glaring typo in the title. You can edit the original post on the main site and automatically push the update to the child sites still using XML-RPC.
I’m not trying to make this sound easy (it won’t be), but it will be possible.
RSS
RSS turns the process around:
The child site is basically just calling home every now and then to see if it needs to be updated. RSS makes sense because it’s lightweight. Also, by keeping XML-RPC turned off, you’re not opening any additional access points to your site.
You can also pull in updates of content from the child site. When you pull in the RSS feed, you can check to see if anything’s changed and update content accordingly.
Again, not trying to make it sound easy … but possible.
Which one would I recommend?
Having worked extensively with XML-RPC (I’ve written some of the interface and consult on it frequently), I’m tempted to suggest that route.
WordPress’ XML-RPC system already includes all of the code necessary to authenticate requests, insert posts, upload media, update posts, etc. Everything you need to create a post on the child site already exists. The bulk of what you’d need to write is the plugin on the main site that pushes content out.
My philosophy is to keep the XML-RPC turned off unless absolutely necessary.
I’m not sure I understand why you would want twelve different installations when you can use one multisite installation with all twelve sites on the same database.
This would make it easier to surface content from the master site on the different sub-sites (via category context) without duplicating db entries and maintaining 12 different databases. There would be no need user/pass storage.
You could create one parent theme that would be used on all sites. Then you can create a child theme for each sub site that only sets a constant defining the category slug to pull content from the master site.
For your concoction of sub and top-level domains you can use this plugin: premium.wpmudev.org/project/domain-mapping/