Two wordpress installs on same domain how to share database? - database

I have 2 wordpress installs on one domain what I want to do is have both installs update posts as I add a post to the main install, how can I do this?

I believe it may be possible to have 2 front facing domains use the same database (share posts) but you will need to make the options parts different tables since they will use different themes/plugins I presume. Take a look at this page they seem to be on the right path. https://wordpress.org/support/topic/2-sites-1-db-possible?replies=15

You are facing a few problems.
First of all, wordpress saves domain names in the database. Also, in posts itself, when you add an image for example, the domain where you are on will be used in that post.
And as what you are doing is highly unusual, third party plugin builders don't take this situation into account, so any new plugin could break your setup in unexpected ways.
Another possible problem, but maybe not really one that concerns you is duplicate content. You'll get two exactly the same articles on two domains, without a canonical url.
Basically I would advise against this. There just are too many unknowns. Maybe a better approach is to investigate how to use WP multisite in this situation, and share content between the sites (this could do the trick), or use an alternative like ManageWP

Related

Drupal 7 Change of View depending on domain

Is it possible in drupal 7 (and any other drupal versions) to have a SHARED DATABASE for 2 sites and the views would change depending on the subdomain / the URL.
Please see the illustration below.
All I want is to have a shared database for multiple site but with multiple view depending on the sub / domain it is accessed and modules / themes scope such as Captcha module should only be visible in the site2.
I'm stuck with this part. My second option is to have 2 database but only 1 database for accessing my site-specific data but for the segregation of content management data I think it would be best if I would have separate database as well for controlling access for modules. Let me know your thoughts.
Thanks in advance.
Yes. Drupal DB abstraction and configuration setup is flexible enough to do the scenario you are going for. You will have to deal with users, then again here too it is a question of choice as Drupal allows you to share users or have different userland for each site. There is a book out there on this subject, and many sites to assist in the various multi-site scenario options.
By the way, you can always post your D questions in drupal.stackexchange.
This is easily solved with Panels as you can just choose the right Views view from there.
There is no reason not to use panels on any drupal site imo.

Drupal 7, Domain Access, and SSO (Single Sign-On)

Has anyone made any headway with coming up with a single sign on solution
with Domain access to date for Drupal 7? I've been looking closely at two old
modules, one no longer maintained (SSO for D6) and one still maintained (CAS). I've also read that SAML might be a key to unlocking this, but am uncertain.
Facebook's FBConnect might be another option too or another way could be integrating OpenID from what I've read, and experienced on StackOverflow's sub sites.
I know that OpenID can do this since we are logged into all of *Overflows sub sites at the same time using one login. The question is how does it cross DNS servers? Does it handshake with one half of a matching hash? I cannot find any documentation on this, so am at a loss.
So, are there any solutions that are known to date, or information on what to start
looking into? I think I've made a good point at the possibilities. I read this thread, Domain Access SSO but am uncertain to what version it pertains to (Drupal. DA, SSO or otherwise). It looks like the "Solution" is to create a master table set with users and permissions, then share those across the domains? How might this work if there are already multiple sites created under Domain Access? Would you clone and rebuild the entire installation, or would you need to start from scratch? It really raises more questions than answers. I contacted the author with no response, so the questions still stand.
Any opinions out there on the who what or why would be greatly appreciated, I just need a start point to get the ball rolling. Thanks everyone.
I'm the author of the Domain Access SSO article mentioned in the original question. I don't recall being contacted about it, but then again I recently learned that my "contact" page on bleen.net hasn't been working in a while... but anyway, here is a bit of info:
That post referred to Drupal 6, SSO Module 6.x-1.0-rc1, and Domain Access module 6.x-2.0 (I think). That solution basically revolves around creating two separate drupal installs, one the master and one the client (there can be multiple clients). Basically, what happens is the necessary user tables for all teh clients are pointed instead to the master. In doing so, the master becomes (essentially) a shell site that does nothing but hold and verify user data.
Hope that makes sense and/or helps... to be honest i havent looked at that code in a long while now.
SAML is a good option. Check this module to integrate it with drupal:
http://drupal.org/project/simplesamlphp_auth
If you need a demo with this plugin working check this.

Multiple Updates in Drupal

I want:
1. To be able to update multiple sites with one upload
2. News page will now database driven
3. Updates in common elements likes LOGOS, COUNTRIES, ADDRESSES, TELEPHONES, FAX NUMBER and EMAIL ADDRESSES can be done with limited HTML knowledge
Hello guys..Is this possible in Drupal 7?
Thanks
It is possible.
But you might need to search for right module or write your own. You might need install the features module or the domain access. But what you are asking is quite general question, with Drupal everything is possible. But you might need to write PHP code for matching your special needs.

Wordpress: difference between site_id and blog_id?

I'm trying to get some understanding of how Wordpress works and while inspecting the database I found that, in a multisite installation, there is a table called wp_site that seems always holding a single record with a corresponding site_id.
I cannot understand (nor find on internet) what is the use of site_id when actually multisites seem to use wp_blogs and corresponding blog_id for identifying different sites.(http://codex.wordpress.org/Database_Description)
Can someone shed some light on what should be my understanding of site_id?
Thanks
Giuseppe
site is a reference to a network of blogs. There are efforts under way to allow WordPress to support multiple networks in addition to multiple blogs, but right now that's not a stock feature (which is why the wp_site table only contains one value.
The wp_blogs table contains all of the blogs for your entire installation, with each identified by the site it's associated with.
This gives you a clean separation between networks, and (eventually) you'll be able to have different "groups" of blogs on one WordPress installation behave like distinct multisite installations.

Best way to be done? Subdomains and MySQL

I'm asking your opinions about my next project..
I'm planning to make website which offers services where all users would be have own subdomain (user.mydomain.com) and own website.
First I was thinking to really make real subdomain, generating automatically website code into their folder, creating own database etc..
Question #1: When I need some information from all subdomains databases in my main page (mydomain.com), how can I fetch those?
Would it be better way just use one database and dynamic code what all users are using but then re-write address like it would be subdomain (mydomain.com?user=myuser -> myuser.mydomain.com)
If someone have experience with something like what I was planning, would be nice to have tips and tricks do it right! :)
Thanks!
It will be alot of less code to maintain in you have one common codebase for all users, that just reads the domain name and uses that information.
Imagine that you discover an error in the code that was generated for one of the subdomains.
Either you would have one place to correct, or you would have 1 place + the number of users to correct.
You'll probably want all of the subdomains to point to the same codebase and treat the subdomain as an argument that is pulled out and identifies which instance of this application it is. You'll need a table in your db that will store information about each instance and then user accounts, user data, etc will all be tied back to a specific instance.

Resources