• I have a question about running two WordPress installs with one database.

    I had a previous install in the root on my server for this website:
    https://www.hecate.ca

    The I installed a second one in a subdirectory at:
    https://www.hecate.ca/ik

    The weird thing is when you click a link on the secondary web, it load the template from the root web and gives a 404 error.

    Here is the congif fle info for the first installation:

    <?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’);
    ?>

    Here is the congif fle info for the secondary installation:

    <?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 = ‘ik_’; // 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’);
    ?>

    Any advice would be welcome. I really don’t want to go through the process of moving the original web to a subdirectory…

    Cheers,
    lanval

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter lanval

    (@lanval)

    It turned out that I had a Page in the original installation set up for https://www.hecate.ca/ik, so I tried moving the new install to https://www.hecate.ca/mechanik. It still gives me the problem…

    Still hoping for some advice. ??

    when u install a new wordpress on the same database you have 2 change 1 thing :

    $table_prefix = ‘ik_’

    if the first wordpress was installed using this prefix

    when you make the second database change this to be something liek

    $table_prefix = ‘ik_2’ // or anything else …

    this is the only difference .

    i tested it and it work , i have 13 wordpress installed on 1 db and its working fine .

    or you can try MU wordpress.. if you are able to install it ??

    Thread Starter lanval

    (@lanval)

    Weirdly enough, that’s exactly what I did . The first first declaration is:
    $table_prefix = ‘wp_’

    The second declaration is:
    $table_prefix = ‘ik_’

    But for some reason the theme form the wp_ blog gets pulled into the ik_ blog and I get the 404 error.

    For example, if I go to the second blog url (https://www.hecate.ca/mechanik/) the first page looks good, but if I click, for example, the Mechanika topic it leads me to the correct URL (https://www.hecate.ca/mechanik/category/mechanika/), but gives the error and wrong theme.

    Thread Starter lanval

    (@lanval)

    Yea! I fixed it.

    The .htaccess file was being shared by both installs. I created a new one for the second site, and it fixed the theme issues.

    As for the 404, I found that it was actually only one category (mechanika) that was the problem. The category was almost idential to the second installs directory name, which was mechaniks. For some reason once I changed the URIs in the wordpress options (pointing them to union), changed the directory name to “union”, and matched this in the .htaccess, it all went right. ??

    Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘issues with a double installation of WordPress’ is closed to new replies.