{"id":8226807,"date":"2016-09-27T15:49:37","date_gmt":"2016-09-27T15:49:37","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/migration-error-2\/"},"modified":"2016-09-27T15:49:37","modified_gmt":"2016-09-27T15:49:37","slug":"migration-error-2","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/migration-error-2\/","title":{"rendered":"Migration error"},"content":{"rendered":"<p>Hello, I am trying this plugin to split up my database to accommodate a large number of sites. I have configured everything according to the documentation but it seems something is missing. When i try to run the SharDBMigration from settings i get the below error.<\/p>\n<p>Error: You must configure your database settings by adding require(&#8216;.\/db-settings.php&#8217;); to your \/var\/www\/blogs.myblogs.com\/wp-config.php for the migration process to work<\/p>\n<p>I have added the below lines to the wp-config.php file but its almost as it it doesn&#8217;t see the file. <\/p>\n<p>define(&#8216;DB_COLLATE&#8217;, &#8221;);<br \/>\nrequire(&#8216;db-settings.php&#8217;);<br \/>\ndefine(&#8216;VHOST&#8217;, &#8216;no&#8217;);<br \/>\n$base = &#8216;\/&#8217;;<br \/>\ndefine(&#8216;DOMAIN_CURRENT_SITE&#8217;, &#8216;blogs.myblog.com&#8217; );<br \/>\ndefine(&#8216;PATH_CURRENT_SITE&#8217;, &#8216;\/&#8217; );<br \/>\ndefine(&#8216;BLOGID_CURRENT_SITE&#8217;, &#8216;1&#8217; );<\/p>\n<p>My db-settings.php file changes are below<\/p>\n<p>\/\/ how many characters of hexidecimal hash<br \/>\n$shardb_hash_length = 1;<br \/>\n\/\/ what is the prefix of your blog database shards (everything before the hexidecimal hash)<br \/>\n$shardb_prefix = &#8216;myblogs_blogs&#8217;;<br \/>\n\/\/ set a string to be used as an internal identifier for the dataset<br \/>\n$shardb_dataset = &#8216;123&#8217;;<br \/>\n\/\/ do you want to put your primary blog (blog_id 1) in its own &#8216;home&#8217; database?<br \/>\n$enable_home_db = true;<br \/>\n\/\/ how many, if any, VIP databases do you have?<br \/>\n$num_vipdbs = 0;<br \/>\n\/\/ add this to set the write master read priority (default 1)<br \/>\n$shardb_master_read = 99;<br \/>\n\/\/ add this if all of your databases are on a local server<br \/>\n$shardb_local_db = true;<br \/>\n\/\/ use this function to add a read slave host<br \/>\nadd_slave($read_priority, $hostname, $local_hostname, $user, $password); <\/p>\n<p>Any help would be appreciated.<\/p>\n","protected":false},"template":"","class_list":["post-8226807","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8226807","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8226807\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=8226807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}