Title: Multiple WP blogs using same database.
Last modified: August 19, 2016

---

# Multiple WP blogs using same database.

 *  Resolved [derekbarker](https://wordpress.org/support/users/derekbarker/)
 * (@derekbarker)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/)
 * I have a heavily modified version of WP that I am using for a movie blog website.
 * What I want to do is create separate websites that use their own template, but
   use the same information and images from the main website.
 * For example: I maintain the main website with 1,500+ pages of content.
 * I then create a half dozen sites that use their own template and ads, but display
   information and images from the main site.
 * Working in this way I can maintain one database to promote multiple companies.
 * Any help would be appreciated. I have a separate site connected to the database
   already, that was easy. Images do not load though, and any link I click goes 
   to the main website.
 * Thanks!
 * main website: [http://www.zazzoid.com](http://www.zazzoid.com)
    copy: [http://tvdl.biz/](http://tvdl.biz/)
 * Database works… But the path still points to zazzoid. 🙁

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/page/2/?output_format=md)

 *  Thread Starter [derekbarker](https://wordpress.org/support/users/derekbarker/)
 * (@derekbarker)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/#post-1395092)
 * I think that it will work if I hard code the SiteURL instead of loading it from
   the database.
 * Working on figuring that out. Bruising my forehead on my desk in the process.
 *  Thread Starter [derekbarker](https://wordpress.org/support/users/derekbarker/)
 * (@derekbarker)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/#post-1395093)
 * OK…
 * Now I think that it will mean I need a separate ABSPATH.
 * Any advice would be awesome. I’ve managed to kill the site a few times now trying
   to do that. 🙂
 *  Thread Starter [derekbarker](https://wordpress.org/support/users/derekbarker/)
 * (@derekbarker)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/#post-1395100)
 * I manually changed “home” in the main database and that changed the links on 
   both sites.
 * Now I am looking for a way for each installation to use a unique variable for“
   home”, but still use the same content.
 * As usual, any direction would be greatly appreciated. I am a persistent novice,
   nothing more.
 * I need to figure out what script loads the “home” information from the database…
 *  Thread Starter [derekbarker](https://wordpress.org/support/users/derekbarker/)
 * (@derekbarker)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/#post-1395109)
 * Looks like I am having a conversation with myself. 🙁
 * Anyhow, I found this post: [http://www.heathersblog.com/2007/multiple-blogs-same-content/comment-page-1/#comment-19993](http://www.heathersblog.com/2007/multiple-blogs-same-content/comment-page-1/#comment-19993)
 * It says to create a separate options entry in the database and to connect to 
   that with separate installations. Unfortunately the code she demonstrates with
   no longer exists in current versions of WP.
 * Anybody willing to help alter a current WP install to use shared content but 
   a different options entry? I’ll keep plugging away, but I am by no means a programmer.
   I’m just stumbling along here.
 * Any help would be appreciated.
 *  Thread Starter [derekbarker](https://wordpress.org/support/users/derekbarker/)
 * (@derekbarker)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/#post-1395132)
 * I think that I just need to get secondary versions of WP to access their own 
   version of the ‘options’ database.
 * I’ve made a copy of ‘wp_options’ and renamed it ‘wp_options2’ and then edited“
   zazzoid.com” to “tvdl.biz” in the database.
 * On tvdl.biz I have tried to change every instance of ‘wp_options’ to ‘wp_options2’
   but the links still go to “zazzoid.com”
 * Arghhh!!!! WHY IS IT STILL LOADING THE OLD OPTIONS DATABASE!!?!?!?
 * Mother expletiving expletive!
 * FYI, I am now testing with version 2.8.6 instead of 2.9.2
 * Where-O-where does WP load info from ‘wp_options’…? Certainly not anywhere I 
   have changed it as yet.
 *  [db1987](https://wordpress.org/support/users/db1987/)
 * (@db1987)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/#post-1395144)
 * Hi Derek
 * I am currently trying to do more or the less thing.
 * I am working through your advice so if I come across anything at the end I will
   share. If you think of something before me then please let me know.
 * Thanks
 * David
 *  Thread Starter [derekbarker](https://wordpress.org/support/users/derekbarker/)
 * (@derekbarker)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/#post-1395150)
 * Hey David,
 * Thanks for the reply.
 * I keep hitting a wall when I change ‘options’ to ‘options2’ in `public_html/tvdl/
   wp-includes/wp-db.php`
 * As I truly don’t know what I am doing, I am just changing ‘options’ every I find
   it.
 * When I edit this line I am sent to a WP installation page.
 *     ```
       var $tables = array('users', 'usermeta', 'posts', 'categories',
       'post2cat', 'comments', 'links', 'link2cat', 'options2',
       'postmeta', 'terms', 'term_taxonomy', 'term_relationships');
       ```
   
 *  [db1987](https://wordpress.org/support/users/db1987/)
 * (@db1987)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/#post-1395191)
 * Hi Derek.
 * I have two blogs now reading the same data from one database, my only issue now
   is having the second blog use its own domain for permalinks instead of the primary
   blog.
 * I have site1.com and site2.com, if you go to site2.com the home page stays site2.
   com unfortunately when you click on a post etc it goes to site1.com/about.
 * I think were nearly there.
 * David
 *  Thread Starter [derekbarker](https://wordpress.org/support/users/derekbarker/)
 * (@derekbarker)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/#post-1395234)
 * Hey David,
 * That sounds like where I have been stuck all day. Copying the config.php file
   from site1.com and pasting it into site2.com seems to do the trick with the data.
 * Somehow we need to get site2.com to read an alternate version of the ‘wp_options’
   database. In my case it is ‘wp_options2’.
 * I’ve given up for the day. I’ve spent about 12 hours on this and need to clear
   my head.
 * Please post if you manage to get that last step to work.
 * Derek
 *  [db1987](https://wordpress.org/support/users/db1987/)
 * (@db1987)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/#post-1395237)
 * Hi Derek, I have accomplished what we set out to, Im just doing some final checks
   on it and making sure I have a universal admin for you. I will set up a step 
   by step of what I done for you to have a look at if you like?
 * David
 *  Thread Starter [derekbarker](https://wordpress.org/support/users/derekbarker/)
 * (@derekbarker)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/#post-1395257)
 * Awesome!!
 * I’m staring at a database not knowing what I am looking for.
 *  Thread Starter [derekbarker](https://wordpress.org/support/users/derekbarker/)
 * (@derekbarker)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/#post-1395292)
 * I may have figured it out…
 * I couldn’t connect to my second options database, so I decided to create a second‘
   home’ database. I named it ‘2ndhome’.
 * Now I am looking for ‘home’ in /public_html/tvdl/wp-includes/link-template.php
   and changing it to ‘2ndhome’
 * Also had to make changes to /tvdl/wp-content/themes/ondemand/header-home.php 
   and it seems to work perfectly!!!
 *  [db1987](https://wordpress.org/support/users/db1987/)
 * (@db1987)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/#post-1395296)
 * Im not quite sure I follow Derek.
 * Are you talking about “get_option(‘home’)”?
 * I never touched any of that as I wanted to be able to configure the blogs with
   different options from themes, settings, permalinks, plugins etc etc. I have 
   made a few changes in 3 core files.
 * For my sites I wanted to share the users across the sites as well which I have
   sorted. This doesn’t need to be configured if you want users to have to sign 
   up for each site.
 * I will post a full markup in the morning, I would email it over but its probably
   better on here in the hope someone else can benefit from it or advise on perhaps
   an even easier solution.
 * Cheers
    David
 *  Thread Starter [derekbarker](https://wordpress.org/support/users/derekbarker/)
 * (@derekbarker)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/#post-1395300)
 * That would be awesome. I suspect there is an easier way than what I figured out.
 * I also share users, the only thing that is not shared is the template.
 * There is still an issue when I use “www” in front of site2, it does not load 
   my gallery images. Without the “www”, the galley looks fine. That may not matter
   as I am reprogramming the gallery to work with an automated script that adds 
   film data and images from imdb.com
 * Looking forward to your “how to”. Has to be easier than mine.
 *  Thread Starter [derekbarker](https://wordpress.org/support/users/derekbarker/)
 * (@derekbarker)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/#post-1395392)
 * Hey David,
 * Not sure if you will read this. Are you coming back to post how you accomplished
   this?
 * It’s been a giant pain making one copy, and I want to make several more. Any 
   help to shorten the process would be tremendous.
 * Derek

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/page/2/?output_format=md)

The topic ‘Multiple WP blogs using same database.’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 21 replies
 * 6 participants
 * Last reply from: [markegan](https://wordpress.org/support/users/markegan/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/multiple-wp-blogs-using-same-database/page/2/#post-1395506)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
