Support » Plugin: SharDB » Login Issue After Migration & Placement of db.php

  • Resolved cmdr_riker


    okay.. i’ve scoured the web and google fu’d till exhaustion.

    this is all being done on my dev site (clone of production btw.)

    i’ve created my db’s
    tried to put shardb-admin.php in mu-plugin folder – no workee sooo
    i put it in shardb-admin.php in plugins and that worked
    i ran the global migration and then sites
    that seems to run successfully…
    sooo when i move db.php to wp-content poof! i get redirected to the login screen and there’s nothing in my error log or debug that seems to indicate what’s going on.

    i think its not finding the right tables/blog #’s now in my sharded db

    entering my password doesn’t work.. the main site has a blank screen. i’ve got nothing more to go on in the instructions. i am using an env.php… but everything works until i drop db.php in wp-content.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Ron Rennick


    Did you edit the included db-settings.php to configure? Did you follow the instructions in the guide?

    When you install a plugin in the mu-plugins folder you don’t upload the folder just the plugin file.

    Yes I modified the db-settings.php to include:

    $shardb_hash_length = 1; — because i’m using the 17 db’s
    $shardb_prefix = ‘shard_yorkwpms_’; — name of my db’s
    $shardb_dataset = ‘milton’; — my secret key

    i followed the instructions and placed the plugin file in my mu plugins dir and chowned them to my nginx-apache user with 775 perms.

    i ran the migration script and its seemed to populate the databases correctly
    the problem i have is when I move db.php to my wp-content folder i get stuck in a redirect loop at wp-login…

    i am retracing my steps..perhaps i missed something.

    Plugin Author Ron Rennick


    Where did you add the require( ‘db-settings… line?

    Where did you add the require( ‘db-settings… line?

    Boone Gorges has been working on my setup so i’ve got an env.php along with my wp-config.php.

    i’ve tried placing the line in both and I get the successful display of the shardb migration. i click on that and try to now migrate my global and i get a 404…

    I’m pretty much spun around here so i’m going to take a break from this.



    cmdr_riker – This might be my doing. Your env.php file contains a constant SKIP_SHARDB. This is a custom constant I introduced in order to allow for non-sharded copies of the site (such as in local dev environments, where having thousands of databases can be inconvenient). Make sure that this constant is defined as false in your env.php file.

    I got the plugin working by placing require('db-settings.php'); in my env.php file.

    I’ve tested that this works in either wp-config or env.php –since i’m using the latter as mentioned by jedi Gorges.

    with this issue solved I’m onto another.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Login Issue After Migration & Placement of db.php’ is closed to new replies.