WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Multiple Installs To Same mySQL Problem (8 posts)

  1. asoka1
    Member
    Posted 8 years ago #

    Hello,

    Yesterday, I asked about how to install multiple blogs to the same mySQL database. The reply I as given was:

    "In your wp-config.php file set up the DB_HOST to point to your database URL. Next, set up the DB_NAME to the one database you have, and just modify the $table_prefix for each blog.

    So just use "wp1_", "wp2_" and so on to differentiate the blogs."

    I tried to do this and got the following error when I got to the second step:

    "Fatal error: Call to undefined function: populate_options() in /home/.../..../..../install.php on line 142"

    The only thing I changed in wp-config.php was the $table_prefix, as described above. Everything else is the same.

    What is the problem here? Do I need to define a new database user for the same database?

    Asoka

  2. MichaelH
    Member
    Posted 8 years ago #

    So you have two separate wordpress installations for instance in:

    http://www.asoka1.com/blog1 and all the wordpress files

    and

    http://www.asoka1.com/blog2 and all the wordpress files

  3. asoka1
    Member
    Posted 8 years ago #

    They are actually on two separate domains, as you say, but managed under one cPanel account, i.e. "add-on" domains. So yes, it's what you say.

    Hence, I merely took the wp-config details from the existing and working blog under the first domain in that account, put them in the new install, and modified the "wp_" to "wp1_" in $table_prefix. The latter is the only thing I altered since both installations reference the same database in the same way under the same user account.

    But the error described results.

    Asoka

  4. MichaelH
    Member
    Posted 8 years ago #

    So the first installation worked okay?

    Maybe not all the wordpress files got uploaded to the 2nd domain. Maybe delete and reupload those files.

  5. asoka1
    Member
    Posted 8 years ago #

    Correction: it's not exactly as you stated. Rather, it's:

    asoka1.com/blog1
    asoks2.com/blog2

    I guess my explanation above made that clear though.

    Asoka

  6. asoka1
    Member
    Posted 8 years ago #

    Okay, I can try that now. And yes, the first one has been running for several weeks now.

    Asoka

  7. asoka1
    Member
    Posted 8 years ago #

    That worked fine. Thank you. Perverse things, computers! I could have spent hours on this, just because the upload did not happen properly.

    Thanks again.

    Asoka

  8. MichaelH
    Member
    Posted 8 years ago #

    Thanks for the feedback. Please consider marking this thread resolved.

    Good luck.

Topic Closed

This topic has been closed to new replies.

About this Topic