Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jul 2009
    Posts
    207
    Thanks
    27
    Thanked 0 Times in 0 Posts

    more than one wp site in one database?

    i want to start multiple websites on wordpress and "most" of them will not be big sites. considering that i am running out of available databases given to me by my host, can i install more than one wordpress site in a single database?

    what exactly do i need to do?

    what if my sites get bigger or i install, say 30 sites in one database... you do not advice this or it really doesnt matter ? number of sites or the size of sites?

    and is it easy later to separate, if one of the sites gets bigger or more popular so that i decide to give it its own db?

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    No reason why you can't put everything in one database (two databases is like two universes).

    All you need to do is to set the prefix for the tables for each WP site to a different value for each - you should be setting it to a value other than the default when you load each anyway so its just a matter of giving them values that let you know which is which.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    Regular Coder
    Join Date
    Jul 2009
    Posts
    207
    Thanks
    27
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by felgall View Post
    No reason why you can't put everything in one database (two databases is like two universes).

    All you need to do is to set the prefix for the tables for each WP site to a different value for each - you should be setting it to a value other than the default when you load each anyway so its just a matter of giving them values that let you know which is which.
    thanks a lot , and so in theory it never makes a difference as for working of the site etc, as long as i name the tables different for each site which i will do correct? and if one site gets bigger, i still do not have to separate it then, correct? so it doesnt matter at all? and what if i tried to separate later? is it just a matter of separating certain prefixed tables and wouldnt be a problem?

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Unless you plan on moving one to where it can't share the database with the others then there is no reason why they can't all share forever.

    If you did need to separate them (eg. if you sold one of the sites to someone else) then it is just a matter of backing up the appropriate tables from that database and restoring them in the new database. You may need to change values in the wp config file as well but that's about it.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • Users who have thanked felgall for this post:

    ketanco (04-18-2014)

  • #5
    Regular Coder
    Join Date
    Jul 2009
    Posts
    207
    Thanks
    27
    Thanked 0 Times in 0 Posts
    ok thanks a lot. i fully understand now


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •