• Hello everyone-Happy New Year

    My ISP/Server provider is 1and1 and I currently have two MySql Databases in the package [which is underused by me]. I have three small WordPress Websites and I need to share two of them with one database.

    When I set up the “install-php” etc can I put some dashes [or directories] or whatever to divide the database up.

    So many thanks – Regards John

Viewing 4 replies - 1 through 4 (of 4 total)
  • During the install when you are prompted for the db informaiton, just use one of your existing db’s and change the table prefix to something other than wp_ just use something like wp2_ that will set-up a unique set of tables in the db for that blog. You can install several blogs in the same db using this technique.

    Hello Figaro!

    I love your answer, but I don’t know how to use it… I’ve got two blogs that need to have the same db, just a slightly different presentation. I installed the new one at a subdomain but have it using the same db…

    I have no idea how to “change the table prefix” and am afraid of screwing up the original site. So it sounds like the perfect solution but I need a little more information if at all possible…

    you change the table prefix inside the wp-config.php

    I’ve got two blogs that need to have the same db, just a slightly different presentation.

    This is confusing language.

    Do you want your 2 blogs to share the same tables or the same database? The 2 arent mutually exclusive.

    1.) Upload the WP files to your 1st site directory (example: https://www.yoursite.com/blogfiles)

    2.) Find the file in the WP folder called wp-config-sample.php, open it up in a text editor (NOT MS WORD!) and find the line of code below and change is to a simple blog (see name where I typed ‘blogname1’) as follows:

    $table_prefix = ‘blogname1_’;

    3.) Save that file as wp-config.php and upload it to your blog directory.

    4.) Install your blog (https://www.yourdomain.com/blogfolder/wp-admin/install.php

    Repeat these steps for your 2nd installation but in that blog’s wp-config.php file, change the line above to something like:

    $table_prefix = ‘blogname2_’;

    Then run through your installation process.

    Hope that helps.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Using 1 MySql Database for two wordpress sites’ is closed to new replies.