Support » Miscellaneous » Instaling two wordpress ?!

Instaling two wordpress ?!

  • Hi

    I already got one wordpress installed in domain.com/subdomain1
    and in the function.php – I changed the database name to “wp1”

    Now, could I do ahead and do similar thing to /subdomain2
    and change it to “wp2” ?!

    Will this make sure that two different database tables are being used?
    In other words: will this cause any issue with my other installed WP ?


Viewing 10 replies - 1 through 10 (of 10 total)
  • “… and in the function.php – I changed the database name to “wp1”
    of course this was done prior (before) I run the installation etc

    Just for clarification 😀

    Running 2 WP installs is fine when they are in separate domains/subdomains/folders

    So your setup will be good. There should be no conflict file structure / URL wise

    As for the database, you have 2 options. You can have an individual database for each install, but it sounds like you want to use 1 database

    That also works well, you just need to use a different prefix in the database for the second install, as you have suggested — You should be able to setup that prefix during installation, I believe WP asks for a DB prefix during the install phase



    Yeh, could I not create a different database table
    and specify it so in the function.php?

    Reason for that is so it wont mess up my other wp database table 🙂

    functions.php in your theme?

    I think the issue is, if you are to the point of editing your theme files, WP is already installed – would that not be true? So the tables are already set up.

    If you handle the prefix at installation time, it’s done from the start.

    I personally have about 10 WP sites running on my server, and I prefer to have 1 DB per install. It just keeps everything individual. That’s just my preference

    Yeh, thats what I am saying = 1 DB per install.
    in my cPanel there is the MySQL option, where you can go ahead and create many DB TABLES.

    Cannot recall the WP installation process asking you if wanting to create a new table etc?!

    Ah… OK. You want the individual tables. That’s the way I prefer.

    So yeah. You actually tell WP what table to use in the wp-config.php file for each install.

    So you already have 1 installation in one table.

    You now make your new table through phpmyadmin, or whatever cpanel tool you have available to you.

    You can then input the new details on installation, or manually edit wp-config.php of the new install.

    Info here may help

    The info that you enter into wp-config.php (or enter into the setup screen) will point WP to use the new database

    Moderator Jan Dembowski


    Edit: The Right Reverend Voodoo replied faster than I did. 😉

    in my cPanel there is the MySQL option, where you can go ahead and create many DB TABLES.

    You can use one DB and just have a different $table_prefix for the different installations via your wp-config.php file.

     * WordPress Database Table prefix.
     * You can have multiple installations in one database if you give each a unique
     * prefix. Only numbers, letters, and underscores please!
    $table_prefix  = 'wp_';

    They’ll need to be in different independent directories but that does work.

    I’m avoiding the mention of Multisite at the moment. 😉


    Yeh both WP will be on different directories anyway.
    And yes, I was going to use a different table_prefix

    But was not clear about the DB Table.
    In simple terms, both WP using ONE DB TABLE but with different prefix?!

    I just thought, if anything happens then it will mess up the database of my first wp (where I have over 200 pots lol)

    Moderator Jan Dembowski


    The different table prefixes means different tables.

    If the two installs have different table prefixes (they should) they you will not be sharing the same tables. Just the same database.

    Great 🙂

    That rests my mind now 😀

    Cheers all

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Instaling two wordpress ?!’ is closed to new replies.