Monday, September 12, 2011

Greetings to all, since a few days. I have to experiment to WordPress 3.1 for the system to share the same user ID and cookie.

Here I explain more clearly what I have done. First I have the original domain is http://example.com, and I make a sub domain based on the original domain of http://.my.example.com.
When I sign in to my domain all sub-domains are also automatically signed as well. Similarly with the other hand, if I sign in to my sub-domain is automatically entered my original domain. Both the domain and sub-domain will not overlap with each what we post.

Domain => Sub-domain
http://example.com (sign in) => http://my.example.com (auto sign in)
http://example.com (sign out) => http://my.example.com (auto sign out)

or

Sub-domain => Domain
http://my.example.com (sign in) => http://example.com (auto sign in)
http://my.example.com (sign out) => http://example.com (auto sign out)


NOTE, THIS TIP IS ONLY SUITABLE FOR THE NEW FRESH WORDPRESS 3.1 (and above, maybe) INSTALLED ONLY)

Well I will show how.

1. Create a new database name (only one database that is used on all domains and subdomains)

2. When making your installation of Wordpress 3.1 will fill in the necessary data to allow the system to your Wordpress to the database.


For all domains and subdomains please fill in the Database name, User name, Password and Database Host.

But the situation is different for Table Prefix: -
Main domain please fill in "wp_"
Subdomains please fill in "wp1_" so with the other domain / subdomain only need to add the number.
  • Main domain "wp_"
  1. Subdomain 1 "wp1_"
  2. Subdomain 2 "wp2_"
  3. Subdomain 3 "wp3_"
    3. Make sure the username and password are the same for each domain and subdomain. (Do not register a subdomain to another username and password.)

    Continued on next post...

    .

      4 comments:

      Domain name registartion india said...

      Great explanation about this topic and i am new guy to this job so this information is really great for me. Thanks for your blog, I just subscribe your blog. 

      MrTRanCeEviL said...

      Thanks for subscribe. For now I still busy making some a new theme Wordpress for some main site. Later I will continue at next post about cookie sharing and Wordpress Hack at fast as I can. ;)

      Banking Awareness said...

      We are looking for this solution. We've planned it but never tested it. Will try it and implement it.

      MrTRanCeEviL said...

      About this post. I will make another update for Wordpress 3.3 version also I will put update fix for this post. Sorry for delay again.

      Flag Counter

      free counters
      hit tracker