WordPress.org

Ready to get started?Download WordPress

Forums

SharDB
[resolved] Shardb install on localhost WAMP (9 posts)

  1. DolphinGuy
    Member
    Posted 1 year ago #

    Hello everyone,

    I continue my quest of creating a very large WPMU website. Therefore my need to use Shardb. I have Shardb installed on various beta websites in all three configurations 16, 256, 4096. Currently I am trying to install it locally on a localhost WAMP Server.

    I’ve been meet with the following stream of errors, which I have uploaded to my box account as follows.

    https://www.box.com/shared/2biuctdqg7jqne1p7krd

    Fortunately this is not a life or death situation, I would just like to get it running locally - if that is at all possible.

    Any help on matter will surely be appreciated.

    Regards,
    Loui

    http://wordpress.org/extend/plugins/shardb/

  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    That link just gives a redirect loop for me. What are the first couple error messages?

  3. DolphinGuy
    Member
    Posted 1 year ago #

    Hi Ron,

    Sorry for having not posted [Resolved] earlier, but I have been very busy. However, the issue of getting Shardb running locally has been resolved for some time now and Shardb has been working perfectly on several local installs.

    Again, many thanks for the great plugin.

    DolphinGuy

  4. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    You're welcome.

  5. mipsgeek
    Member
    Posted 1 year ago #

    Hello Ron,

    I am managing a multisite subdomain multidatabase WordPress instance. This site is a development site in preparation for a production WordPress instance. SharDB does an excellent job of handling the multidatabase aspect of this WordPress instance. However, I have some questions to start with:
    1) In SharDB-2.7.6 the function add_shardb_migrate_page() contains the line "add_submenu_page( 'settings.php', 'SharDB Migration',...". The file settings.php DOES NOT exist in the wp-admin directory. I was able to overcome this by substituting ms-admin.php for settings.php in this line. So, why does this line have settings.php in it?

    2) Immediately following the end of the above function is the line "add_submenu_page( 'network_admin_menu', 'add_shardb_migrate_page' );". The only way I could get SharDB Migrate to appear ANYWHERE was to substitute admin_menu for network_admin_menu. Did you intend something of this sort?

    3) Did you intend SharDB to ensure that each site is stored in its own unique database? The SharDB site table migration function DOES NOT ensure this. I was eventually able to get each site into its own database by adjusting the SharDB site table migration function. However, once db.php has been added to the wp-content directory, SharDB migration is no longer available. In that case the addition of NEW sites seems to be handled by SharDB's extension of WPDB via db.php.
    The shardb-admin.php file's functionalities do not appear to come into play when adding a NEW site. Am I wrong about this?
    This leads me to the last question.

    4) When a new site is added by pressing "Add New" in WordPress Sites->Add New Site the chances are approximately 75% that the new site's tables will be inserted into a database that ALREADY contains a previously created site's tables. I can overcome this problem by repeatedly deleting the new site and re-adding it. It takes about three tries to get SharDB to insert the new site's tables into an empty database. So, Ron, do you have any suggestions about resolving this issue?

    Thank you for producing a splendid plugin and thank you in advance for your help.

    Mipsgeek

  6. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    1) & 2) I know that needs to be fixed. It's on my to do list.

    3) No, it isn't designed to give each site it's own DB. cPanel hosts do not allow the WordPress DB user permissions to create DBs so a feature like that is impractical for general use.

    The shardb-admin.php is only the migration tool and adds the Database column to the Network Admin -> Sites listing. You can remove it and SharDB works fine without it.

    4) Except home, VIP & global databases, SharDB uses 16, 256 or 4096 DBs (depending on how it is configured) regardless of how many sites you have.

  7. mipsgeek
    Member
    Posted 1 year ago #

    Thanks for answering these questions, Ron!

    I have made significant headway toward adapting SharDB, i.e. db.php, to actually insert any new site (which has been added via "Add New" in WordPress Sites->Add New Site) into it's own unique database.

    For example, suppose there are 16 previously created databases (foodb_0 thru foodb_f). Further suppose that foodb_2, foodb_c, and foodb_f are all empty and contain no site tables. I have successfully adjusted dp.php to create the new site's tables in the first available, i.e. empty database which in this case is foodb_2. SharDB then successfully populates the newly created tables by inserting the appropriate global table values into the corresponding site tables.

    Everything works fine up to this point. The only remaining hurdle is to overcome the fact that after the new site has been created and it's tables have populated, in the WordPress->Sites "Dataset / Partition" column the new site is most likely labeled "foo / foodb_4" or some other already used and therefore unavailable database. In fact, since the new site's tables were created in foodb_2 the column entry for the new site should be "foo / foodb_2"! Because WordPress "thinks" that the new site is in foodb_4, for all intents and purposes the new site and it's site tables are unavailable.

    I can address this if you can answer this question:
    Do you know the method (or criteria) by which either WPDB of SharDB chooses the database in which to insert a new site? Knowing how the database is chosen will allow me to "tell" WordPress in which database the new site and it's tables are actually located.

    Thank you, Ron,
    Mipsgeek

  8. mipsgeek
    Member
    Posted 1 year ago #

    Hi again, Ron,

    Your mention of cpanel hosting surely makes sense as to why SharDB sn't designed to give each site it's own DB. However, the WordPress instance that I manage is hosted on our college's own WordPress server. So, this being the case, I have undertaken the challenge of adjusting db.php to actually ensure that new sites and their site tables are placed in their own unique database.

    Mipsgeek

  9. Anointed
    Member
    Posted 1 year ago #

    @mipsgeek
    Are you able to provide a download link to your modified version that creates new tables for each blog? I'm only guessing that by now you have answered your last questions and have everything working right, if so, it would be appreciated if you are able to share it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic