WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Two installations on single database (8 posts)

  1. Spoondog
    Member
    Posted 4 years ago #

    I'm having a problem with admin when installing two blogs on a single database.

    I have got brand new hosting with cpanel, and I'm trying to install two blogs into separate folders - http://www.mysite.com/tennis and http://www.mysite.com/squash. I entered separate table prefixes when doing the cpanel install, and everything went smoothly - both blogs show up fine.

    However, when I try visit the "Site Admin" link and log in (for either blog), it will display the error "You do not have sufficient permissions to access this page."

    Looking at the wp-config.php files that were created in each directory, they seem to be correct according to this support page. Here are the relevant parts of each wp-config.php file:

    define('DB_NAME', 'admin_wp1');
    define('DB_USER', 'admin_wp2');
    define('DB_PASSWORD', 'xxxxx');
    define('DB_HOST', 'localhost');
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');
    
    define('AUTH_KEY', 'xxxxx');
    define('SECURE_AUTH_KEY', 'xxxxx');
    define('LOGGED_IN_KEY', 'xxxxx');
    define('NONCE_KEY', 'xxxxx');
    
    $table_prefix  = 'tennis_';
    
    define ('WPLANG', '');
    define('DB_NAME', 'admin_wp1');
    define('DB_USER', 'admin_wp1');
    define('DB_PASSWORD', 'xxxxx');
    define('DB_HOST', 'localhost');
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');
    
    define('AUTH_KEY', 'xxxxx');
    define('SECURE_AUTH_KEY', 'xxxxx');
    define('LOGGED_IN_KEY', 'xxxxx');
    define('NONCE_KEY', 'xxxxx');
    
    $table_prefix  = 'squash_';
    
    define ('WPLANG', '');

    Any idea why this might be happening?

  2. Micah Cooksey

    Posted 4 years ago #

    You might check your FTP permissions. Your folders (as a general rule) should be set to 755, and files (again as a general rule) should be set to 644.

  3. Spoondog
    Member
    Posted 4 years ago #

    Checked permissions and all folders are currently 755, files 644.

    Also checked the database permissions and both users have access to all DB operations.

    Thanks for the reply.

  4. Spoondog
    Member
    Posted 4 years ago #

    Anyone else have any ideas? Seems like it should be something very simple :/

  5. christian_gnoth
    Member
    Posted 4 years ago #

    htaccess?????

    you can also use wordpress mue

    http://mu.wordpress.org/

  6. henkholland
    Member
    Posted 4 years ago #

    Hi,

    in your tennis wp-config.php it says this:

    define('DB_NAME', 'admin_wp1');
    define('DB_USER', 'admin_wp2');

    and that should be:

    define('DB_NAME', 'admin_wp1');
    define('DB_USER', 'admin_wp1');

    bit I guess it's a typo.

    You only have one DB so admin and user for the DB should be identical in Squash and Tennis.

  7. Spoondog
    Member
    Posted 4 years ago #

    Thank you for the replies guys!

    I've narrowed it down to the table prefix now (not multiple installations) but still not sure what the problem is.

    • If I install a single blog on a new DB with the default "wp_" as the table prefix, it works fine.
    • If I install a single blog on a new DB but change the prefix to "wp1_", then I can't log in to the admin area, even though wp-config.php has "$table_prefix = 'wp1_';" in it!

    I don't get it! *_*

  8. Spoondog
    Member
    Posted 4 years ago #

    Yay! Thanks to another thread that linked to this page, I solved my problem.

    Some keys in the database needed their prefix changed manually, as they were still "wp_".

Topic Closed

This topic has been closed to new replies.

About this Topic