{"id":4095,"date":"2014-09-25T04:01:14","date_gmt":"2014-09-25T04:01:14","guid":{"rendered":"http:\/\/www.dognmonkey.com\/techs\/?p=4095"},"modified":"2016-02-05T15:49:44","modified_gmt":"2016-02-05T23:49:44","slug":"how-to-split-prefix-database-to-individual-database-for-wordpress","status":"publish","type":"post","link":"https:\/\/www.dognmonkey.com\/techs\/how-to-split-prefix-database-to-individual-database-for-wordpress.html","title":{"rendered":"How To Split Prefix Database To Individual Database For WordPress"},"content":{"rendered":"<link href=\"\/idogjs\/icss\/font-awesome\/css\/ifotorama.css\" rel=\"stylesheet\"><script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.11.3\/jquery.min.js\"><\/script><script src=\"\/idogjs\/ijs\/ifotorama.js\"><\/script>\n<p style=\"text-align: center;\"><em>Alright, I had a few blogs sharing the same database by using prefix database in WordPress and the blogs are getting bigger and the single database getting larger. The problem is that every time the database goes down, all blogs go down which is not good for my website. I don&#8217;t want to re-install WordPress blog and lose all shares data and stuff. The only way to keep everything the same is to point the blog to the same exact database at the moment. So, before I write any new posts, updated everything and start to export\/import database process for my blogs.<\/em><\/p>\n<p style=\"text-align: center;\"><em>[title]Export A Prefix Database Tables[\/title][body]<\/em><\/p>\n<p style=\"text-align: center;\"><em>First, we need to find out from the blog which prefix &#8220;wp_xxx&#8221; was set in the wp-config.php. My main database has 3 blogs in them with 3 prefixes wp_audi, wp_svlife and wp_family. I need to export all tables in wp_svlife, wp_audi, wp_family to sql files then import them all to a newly created database. When it&#8217;s done, all I need to is to change the database in the wp-config.php with the new database and same prefix wp_svlife and it&#8217;s done.<\/em><\/p>\n<p style=\"text-align: center;\">\u00a0\u00a0 <em>If the sql files are bigger than 50Mb, use 7-zip to zip them smaller. phpMyAdmin can import zip files also.<\/em><\/p>\n<p style=\"text-align: center;\"><em>[\/body]<\/em><\/p>\n<div class='fotorama--wp' data-ids='5378,5379,5380,5381,5382,5383'data-allowfullscreen='yes'data-link='file'data-itemtag='dl'data-icontag='dt'data-captiontag='dd'data-columns='0'data-size='large'data-width='531'data-auto='false'data-max-width='100%'data-ratio='1.9887640449438'><div id='gallery-1' class='gallery galleryid-4095 gallery-columns-0 gallery-size-thumbnail'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix1.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix1.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix1-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix2.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix2.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix2-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix3.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix3.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix3-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix4.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix4.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix4-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix5.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix5.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix5-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl>\n\t\t<\/div>\n<\/div>\n<p style=\"text-align: center;\"><em>Create New Database and Import Database Tables for a specific prefix<\/em><\/p>\n<div class='fotorama--wp' data-ids='5386,5387,5388,5389,5390,5391,5392,5393,5394,5395,5396'data-allowfullscreen='yes'data-link='file'data-itemtag='dl'data-icontag='dt'data-captiontag='dd'data-columns='0'data-size='large'data-width='528'data-auto='false'data-max-width='100%'data-ratio='1.9628252788104'><div id='gallery-3' class='gallery galleryid-4095 gallery-columns-0 gallery-size-thumbnail'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix6.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix6.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix6-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix7.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix7.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix7-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix8.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix8.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix8-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix9.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix9.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix9-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix10.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix10.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix10-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix11.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix11.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix11-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix12.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix12.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix12-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix13.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix13.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix13-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix14.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix14.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix14-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix15.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix15.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix15-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix16.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix16.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix16-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl>\n\t\t<\/div>\n<\/div>\n<p style=\"text-align: center;\"><em>Change the database name and prefix in wp-config file to the new database<\/em><\/p>\n<div class='fotorama--wp' data-ids='5397,5398'data-allowfullscreen='yes'data-link='file'data-itemtag='dl'data-icontag='dt'data-captiontag='dd'data-columns='0'data-size='large'data-width='600'data-auto='false'data-max-width='100%'data-ratio='4.7619047619048'><div id='gallery-5' class='gallery galleryid-4095 gallery-columns-0 gallery-size-thumbnail'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix17.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix17.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix17-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix18.jpg' data-full='https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix18.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"112\" src=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/09\/z_prefix18-200x112.jpg\" class=\"w3-image attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl>\n\t\t<\/div>\n<\/div>\n<p style=\"text-align: center;\"><ul class=\"lcp_catlist\" id=\"lcp_instance_0\"><\/ul><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Alright, I had a few blogs sharing the same database by using prefix database in WordPress and the blogs are getting bigger and the single database getting larger. The problem is that every time the database goes down, all blogs go down which is not good for my website. I don&#8217;t want to re-install WordPress <a href=\"https:\/\/www.dognmonkey.com\/techs\/how-to-split-prefix-database-to-individual-database-for-wordpress.html\" class=\"more-link\">&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,20],"tags":[533,532,535,534,531,536],"class_list":["post-4095","post","type-post","status-publish","format-standard","hentry","category-tips-and-tricks","category-wordpress","tag-export-database","tag-import-database","tag-myphpadmin","tag-mysql","tag-prefix-database","tag-wordpress-database"],"views":254,"_links":{"self":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts\/4095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/comments?post=4095"}],"version-history":[{"count":4,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts\/4095\/revisions"}],"predecessor-version":[{"id":5561,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts\/4095\/revisions\/5561"}],"wp:attachment":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/media?parent=4095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/categories?post=4095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/tags?post=4095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}