• Hi,
    I retrieved and read the instructions about installing multiple blogs on one database. I think it says that i need to change one line in the wp-config.php file but I dont’ know where I change it or put it since I dont’ see anything that resembles it there. Is this something that I add to the wp-config.php file? Do I change the wp-config.php fle to say ‘marks-config.php’ if i wanted to add a blog called ‘marks’?

    ‘In this case, however, only a single line will be unique to each blog:
    $table_prefix = ‘wp_’; // ‘

    Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Just change the prefix in the wp-config.php file of the second blog to something different from what’s in that of the first blog. The tables for the second blog will have that prefix and so won’t get mixed up with the tables for the first blog. So instead of having wp_ as the prefix (as in the first blog) you could have wp2_ or whatever you want.

    Thread Starter wordy7

    (@wordy7)

    I apologize if I seem to be retarded, but I am still not getting it. This is what I’ve done.

    In my wp-config.php file for my first blog I have this as my database name: naomi4_wordpress2 (the naomi4 is automatically appended by my domain host and has to be there.

    I went into the wp-config.php file for my second blog and named the database: mwell_naomi4_wordpress2.

    Is this correct? If so what do I do from there? And if not, what in the world am i doing wrong.

    How do I access this new blog (do I need to install it as I did with the first one)?

    And do I need the change the name of the wp_config.php file in the second blog or leave it as it is?

    To access my first one I typed in https://greenwednesday.com/nmblog/wp-login.php.

    I appreciate any help. Thanks.
    Bernie

    You do NOT need a second database. The instructions given to you were clear.

    <i>Just change the prefix in the wp-config.php file of the second blog to something different from what’s in that of the first blog.</i>

    You have 2 installs, each with ONE wp-config.php

    They can be exactly the same except to this:

    $table_prefix = 'wp_'; // Only numbers, letters, and underscores please!

    One might have:

    $table_prefix = 'wp_'; // Only numbers, letters, and underscores please!

    the second might have:

    $table_prefix = 'wp2_'; // Only numbers, letters, and underscores please!

    and yes, you need to install it, how can you NOT install it? (rhetorical question, plase dont answer that)

    Thread Starter wordy7

    (@wordy7)

    whooami,

    below is a copy of the code I see in my wp-config.php file. I do not see any code ‘$table_prefix = ‘wp_’, other than the reference to it in the comments. If I did I would know what I needed to change. This is a copy of my wp-config.php file:

    —————————-
    <?php
    // ** MySQL settings ** //
    define(‘DB_NAME’,”); // The name of the database
    define(‘DB_USER’,”); // Your MySQL username
    define(‘DB_PASSWORD’,”); // …and password
    define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value

    // You can have multiple installations in one database if you give each a unique prefix
    $table_prefix = ‘wp_’; // Only numbers, letters, and underscores please!

    // Change this to localize WordPress. A corresponding MO file for the
    // chosen language must be installed to wp-includes/languages.
    // For example, install de.mo to wp-includes/languages and set WPLANG to ‘de’
    // to enable German language support.
    define (‘WPLANG’, ”);

    /* That’s all, stop editing! Happy blogging. */

    define(‘ABSPATH’, dirname(__FILE__).’/’);
    require_once(ABSPATH.’wp-settings.php’);
    ?>
    ———————————–

    What I need to know is if I have to type this code into the wp-config.php file since this line of code does not exist outside of the comments section.

    I would prefer that you not respond to my question if you can’t use a more considerate tone. Perhaps the previous post was clear to you, but it is obviously not clear to me and that is the point here.

    you just pasted it:


    // You can have multiple installations in one database if you give each a unique prefix
    $table_prefix = ‘wp_’; <— THAT is NOT a comment. // Only numbers, letters, and underscores please!

    Look at what you pasted.

    It’s imperative that people read — no-one can “tell” you what to do. the web is visual, after all.

    For future reference comments in php typically begin with // and you can expect them to end when you see something that begins with $

    That line is in between comments. It isnt a comment.

    Thread Starter wordy7

    (@wordy7)

    thanks that’s all I needed to know. I think this little saying is very appropriate–>“If the student hasn’t learned, the teacher hasn’t taught.” no matter how many times the question has been answered, if it doesn’t resolve the issue, then it lacking…

    I am not a student of php and didn’t know it was a pre-req for using this program. Hopefully this post will help others new to using wordpress who are having the same problem.

    We arent here to teach. Thats what the codex is for. Teaching costs $85.00 an hour according to DrMike.

    We help. And we do it for free.

    hahahahaa i was searching for something and this post was really really nice hahahhaha

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Multiple Blogs One Database’ is closed to new replies.