WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Run two sites from one database (13 posts)

  1. Carmdq
    Member
    Posted 9 months ago #

    Hi. I've been asked if it is possible to have two sites with the same content but different logos, image headers, etc. all while keeping the same content (posts, pages). More importantly it would be necessary to load content from one site only, to maintain both.

    Is this possible and is there and advisable way to do this?

    Thanks

  2. esmi
    Forum Moderator
    Posted 9 months ago #

    You can run two sites from a single database but not from the same set of database tables as the stored data includes the site's domain name. Why would you want to do this anyway? You would risk being hit by Google's duplicated content penalty.

  3. Carmdq
    Member
    Posted 9 months ago #

    Well, a client needs to have the same products he's selling on his WP site, on another WP site. So basically, he's looking for a way to load content just once as opposed to either creating each post twice or copying/ pasting one by one.

  4. Carmdq
    Member
    Posted 9 months ago #

    He would be using different domains by the way. Didn't know about "Google's duplicated content penalty".

  5. esmi
    Forum Moderator
    Posted 9 months ago #

    I suggest you start reading up on this - otherwise both of your client's sites will get hit by this penalty.

  6. Carmdq
    Member
    Posted 9 months ago #

    Apparently is not a big deal, according to this and this but thanks for the advise.

    Could you please expand a bit more on your first answer or point the way to fully understand it?

    Thank you very much for your answers.

  7. esmi
    Forum Moderator
    Posted 9 months ago #

    You would use one database but change the table prefix for the second site during the install process so that the two sites store data independently from one another.

  8. Sandeep
    Member
    Posted 9 months ago #

    Nothing is impossible! But there is no point keeping duplicate content on both places.

    If I understand it correctly, you want the same content without manually have to enter it twice on both sites.

    Regarding using the same database:
    There are two values in the options table: siteurl and home which are used. Using the same options table won't work, even if you update options forcefully for each php run.

    So you would need to use two databases.

    You can use a mysql replicator, to replicate content from one database to another. Make sure to trigger a script at the end of replication to update the siteurl and home to the other domain values.
    http://dev.mysql.com/doc/refman/5.0/en/replication.html

    You need to ensure that no content anywhere has urls which points to the same domain. If there are any such urls, you need to have procedures to replace the urls after replication.

    If your customer need only posts/pages content copies on both places, without the pain of manually copying them over, you can have them post the content via email:

    http://codex.wordpress.org/Blog_by_Email

    Have both instances read via email and make posts/pages from it.

  9. Carmdq
    Member
    Posted 9 months ago #

    Hi sandyr,

    You are correct. The client wants to enter the content in one site and only once, and having it displayed in both.

    "Site 1" would be the same as "Site 2" (with different domain, header, footer), but the content/products should be the same.

    So I was aiming for a way/function/script or anything that would allow him to enter the content just once.

  10. Kakoma
    Member
    Posted 9 months ago #

    Hi Carmdq,
    Does the branding info on the sites have to be customizable? If not, you can have one database and then the themes for each of the sites can be hard-coded with the site name/tagline/etc

  11. Carmdq
    Member
    Posted 9 months ago #

    The site would be the same internally, using the same theme. But the header content, logo, etc. should be different. The site is using custom posts for products. Those posts should feed both sites.

  12. marketermatt
    Member
    Posted 8 months ago #

    I'm looking to do the same thing, but haven't figured it out quite yet. I found this post which seems like it points in the right direction. This post gets me to two separate sites/domains with the same exact content, and as long as the same plugins and themes are installed on both, you can work on edits/changes to the theme/plugin files on one site without affecting them on the other site.

    Now to figure out how to use two separate options tables as well.... Anybody knows how to do this?

  13. esmi
    Forum Moderator
    Posted 8 months ago #

    @marketermatt: If you require assistance then, as per the Forum Welcome, please post your own topic. This topic references an old version of WordPress.

    Closing.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.