Hi Friends, Multiple WordPress Installation into a single database. is it possible and how difficult is it?
This question is arrive when we think about installing multiple WordPress but our server(Host) has a limit of the MYSQL Database. The simple answer to this question is “Multiple WordPress Installation into a single database is possible and it’s not so difficult.”
For installing multiple WordPress on single MYSQL Database we need to install WordPress manually not using one-click programs they would not let you choose the prefix.
Please read here for manually installing WordPress if you don’t know if you already know its good. When we follow WordPress installation steps WordPress will for database pieces of information like in the below image.
We need to enter all the details related to the database here only thing we need to change is Table Prefix. By default, the WordPress table prefix is (wp_). We can change it according to our requirement like below.
For the Main website (www.example.com) We can use table prefix (main_)
For Subdirectory blog (www.example.com/blog) We can use table prefix (blog_)
For Subdomain blog (www.blog.example.com) We can use table prefix (blog2_) or anything that differentiates our table columns.
By using Table Prefix we can install as many WordPress we want on a single MYSQL Database.
Transferring WordPress is a very easy with WordPress plugin, but what happens when we get any error while transferring WordPress using these plugin. Because we are Web Developers so we must have the knowledge of how to manually transfer WordPress .
Transfer WordPress for any of reason like:
To new Domain. To new Hosting. Sub Domain to Root. Root to Sub Domain.
Here are some notes for how to transfer your WordPress manually:
Step – 1
First, We download all files of WordPress From your old server. These files contains WordPress php files, your theme, plugins, media images and many more. We must download all files so that our site correctly transfer successfully.
Step – 2
After Downloading files we need to export database from phpMyAdmin Server. It contains all your WordPress website pages, posts and many more.
Step – 3
After exporting database we need to create database, database user and password on your new server where you want transfer your WordPress, and please copy these details in notepad.
Step – 4
After creating database we need to import our old database to this new server. after import database we need to below steps: 4.1) We need to go wp-options table 4.2) Here we need to change in “siteurl” and “home” row and replace old URL with your new site URL.
Step – 5
After this, we need to upload all files you downloaded from old server to new server and edit “wp-config.php” file and change the values of below data:
— “We need to add new database name you copied when create new database”
define('DB_NAME', 'database name')
— “ We need to add new database user name you copied when create new database”
define('DB_USER', 'database user name');
— “ We need to add new database user password you copied when create new database”
define('DB_PASSWORD', 'database user password');
— “We need to add your server user if not get any server url just add (localhost)”