• Resolved meandmyhouse

    (@meandmyhouse)


    My webhost provides auto-install for WordPress. I am wanting to set up 3 blogs, but on one MySQL database. I understand I need to do a separate install for each blog. But this automatically creates a new SQL DB for each. (I don’t have that many SQL DB available.) So I need to delete the extra DB’s and use one for all blogs.

    I have read the multiple blogs in single database doc section, so pointing me there will not help. I have no idea how to use SQL, so don’t know where to put the line: $table_prefix = ‘wp_’ (‘wp’ = name of table?) or how to create the tables in the DB first, if that is what is needed. I hope I have provided enough info. Can someone walk me thorugh this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    My advice would be to not use the auto-install. Or use it only for the first blog.

    For the following blogs, all you need to do is:
    a) FTP the wordpress files to a new directory on your server
    b) Copy the wp-config.php file from your first blog
    c) Edit the wp-config.php file in a text editor, and change the prefix from wp_ to somethingelse_
    d) FTP that wp-config.php file to your new blog’s directory

    Then you’ll have to run the install.php on your new blog, as per usual.

    Thread Starter meandmyhouse

    (@meandmyhouse)

    Thank you. I understand now, and got it uploaded and finally saw that it was the code in the wp-config file itself that needed changed. I don’t know why I thought that was comment not code (or whatever it is called.)

    Well, I thought I had it, but now at login I am getting these error messages:

    Warning: Cannot modify header information – headers already sent by (output started at /[mywebpath]/wp-config.php:25) in /[mywebpath]/wp-login.php on line 12

    Warning: Cannot modify header information – headers already sent by (output started at /[mywebpath]/wp-config.php:25) in /[mywebpath]/wp-includes/pluggable.php on line 313

    Warning: Cannot modify header information – headers already sent by (output started at /[mywebpath]/wp-config.php:25) in /[mywebpath]/wp-includes/pluggable.php on line 314

    Warning: Cannot modify header information – headers already sent by (output started at /[mywebpath]/wp-config.php:25) in /[mywebpath]/wp-includes/pluggable.php on line 275

    What did I do wrong?

    Also, can I change the name of the [ $table_prefix = wp_ or somthingelse_ ] later, in any of the blogs, or is this set now and will mess things up if I change it?

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    …headers already sent by (output started at /[mywebpath]/wp-config.php:25)

    What did I do wrong?

    What you did wrong was to put some blank lines or something similar at the bottom of the wp-config.php file.

    wp-config.php has a very specific format, and must not be altered from that format. The very first characters in the file must be <?php and the very last characters must be ?>. Anything other than that is unacceptable.

    Check the end of your wp-config.php file. Compare it to the wp-config-sample.php file. Verify that they are similar in formatting, with nothing additional there.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Also, can I change the name of the [ $table_prefix = wp_ or somthingelse_ ] later, in any of the blogs, or is this set now and will mess things up if I change it?

    When I said “somethingelse_”, that was a suggestion. Those characters can be anything at all, as long as they are *unique* for each blog.

    And once you setup the blog, it’s fixed. Changing it will lead to an empty blog.

    Thread Starter meandmyhouse

    (@meandmyhouse)

    That is exactly what happened. When I cut and pasted it in, it added some spaces after the ?>

    It appears to be fixed now.

    And yes, I know, I didn’t really name it “somethingelse_” just something different than the other one. And I will leave them alone at what they are set.

    Thanks again for all your help.

    Until my next questions – getting all my blog posts moved up here. But think I’ll go play with themes and stuff first.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘setting up sql for multiple blogs’ is closed to new replies.