WordPress.org

Ready to get started?Download WordPress

Forums

Testdrive version or two WPs using the same database (7 posts)

  1. trejder
    Member
    Posted 4 years ago #

    Hi there,

    As in title. Is it possible to have TWO copies of WP using the same database. One would be a testdrive version, not public, where I can mess as much as I want doing for example extensible layout change. And second one would be public where I copy only tested and verified changes made in testdrive version.

    Is it possible at all? And if yes, then how to achieve it?

    Of course I can have testdrive version in separate folder and pointing to different database with some test posts and pages. That is simple to achive. But I'm asking is it possbile to have two WPs using the same database?

    Regards,
    Tom

  2. stvwlf
    Member
    Posted 4 years ago #

    Yes you can have two installations in the same database, but the WP files must be installed twice in two different folders. The second set of tables in the database will have a different table name prefix

    http://codex.wordpress.org/Installing_Multiple_Blogs#Single_Database

  3. trejder
    Member
    Posted 4 years ago #

    Nope! This is standard solution and I've used it before. What I was meaning is to have TWO installations using the same SET OF TABLES. So the testdrive version and public one would have the same posts, comments and pages.

  4. sabinou
    Member
    Posted 4 years ago #

    Tredjer, this is, honestly, a bad idea.

    Remember, the most precious thing in a blog is not the files, it's the database.

    If you store both a test blog and a public blog in the same database, then you put your public blog at risk, you aren't free to experiment things affecting your database.

    On the other hand, if you have your two blogs use different databases, you'll be free to wreak havoc inside the test database to test whatever you want, without putting your public blog in danger.

    Of course you can restore a database back, but even then, it's better to keep the databases separated, this way your public blog won't display weird stuff to your visitors when you're making tests.

  5. trejder
    Member
    Posted 4 years ago #

    sabinou, I don't see to much danger in this situation as in my test-drive blog I will only change php files related to theme and don't even touch DB! It's just easy for me to see the same posts in both version.

    But if you suggest that this could put blog on risk and that probably it would be technically hard to achieve then I think i listen to you and use two differenet sets of tables! :) Thanks!

    EoT,
    Trejder

  6. Mark / t31os
    Moderator
    Posted 4 years ago #

    Why not just install WordPress locally, like most other developers do..

    Mac - MAMP
    PC - XAMPP, Uniform Server, WAMP

    It's faster to make changes and load the pages when running locally to.

  7. trejder
    Member
    Posted 4 years ago #

    Oh, Mother of sweet Jesus! :) You're right! :) How stupid I'm not to see such easy solution! :)

Topic Closed

This topic has been closed to new replies.

About this Topic