How To Split Prefix Database To Individual Database For WordPress

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’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.

[title]Export A Prefix Database Tables[/title][body]

First, we need to find out from the blog which prefix “wp_xxx” 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’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’s done.

   If the sql files are bigger than 50Mb, use 7-zip to zip them smaller. phpMyAdmin can import zip files also.

[/body]

Create New Database and Import Database Tables for a specific prefix

Change the database name and prefix in wp-config file to the new database

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.