WordPress.org

Ready to get started?Download WordPress

Forums

2 wordpress sites same user's databse (4 posts)

  1. yadigit
    Member
    Posted 2 years ago #

    Hello, Ive been searching for an answer to my question for about 3 days now. I have 2 wordpress a non-sub domain, and a subdomain.. they are connected in the same database, except for the prefex..
    one is wp_ and the other is wp2_.. I've tried using Multisite.. and completely did not do what I wanted it to do.. I've also tried
    define(CUSTOM_USER_TABLE,'wp_users');
    define(CUSTOM_USER_META_TABLE,'wp_usermeta');
    It works for the most part except for when I try to enter in the /wp-admin.. I get an error message "You do not have sufficient permissions to access this page."....

    Is there any way around this?
    Thanks in advance.

  2. If you're not using Multisite, you're in the wrong subforum. Also I don't know what 'did not do what I wanted it to do' means, so I can't help you with multisite. Perhaps you could elaborate on what you want, because one database, two sites, is exactly what Multisite does :)

    The wp-admin on which site? Both?

    What you should do is make sure the prefix is changed on the wp-config.php of each site to point to the right prefix. Also make sure the same DB details (name, user, password, etc) are the same.

  3. yadigit
    Member
    Posted 2 years ago #

    Sorry for placing this in the wrong sub forum.

    Maybe Multi Site is what I should do, but I guess I didn't do something right?

    Okay, With multi-site.. I expected it how all my sites that I have will be in one easy to navigate admin panel.. so I'll be able to switch back and forth through sites, (ex: example.com, my.example.com, another.example.com) I already had a fresh installed wordpress in the same database with a different prefex. (eg wp_, wp1_, wp2_)..
    I place
    define('WP_ALLOW_MULTISITE', true);
    in both wordpress config.php..

    I ran the installment for example.com. During the installment it asked if im going to run with a sub-domain, or a nonsub-domain.. I installed with sub-domain. I added my site under the "sites" tab, (my.example.com).. It didn't link up with each other.
    The main purpose of this is to have one site just for info, and the other site for buying and checking out.

    I guess the bottom line is to allow 2 wordpress sites with the same user login from the same database prefex.

  4. With multi-site.. I expected it how all my sites that I have will be in one easy to navigate admin panel.. so I'll be able to switch back and forth through sites, (ex: example.com, my.example.com, another.example.com)

    Ah, no,and you won't get that with your current setup either.

    You get this: example.com/wp-admin and my.example.com/wp-admin and so on.

    I place
    define('WP_ALLOW_MULTISITE', true);
    in both wordpress config.php..

    Oh! NO! Don't do that! If you're sharing a DB, that's a nightmare!!!

    If you want to use Multisite, put define('WP_ALLOW_MULTISITE', true); only in the main site (example.com) wp-config.php

    That activates Multisite for that instance, and, after you configure it, allows you to make sub-sites. Like my.example.com :)

Topic Closed

This topic has been closed to new replies.

About this Topic