Support » Fixing WordPress » Testdrive version or two WPs using the same database

  • 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?


Viewing 6 replies - 1 through 6 (of 6 total)
  • 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

    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.

    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.

    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!


    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.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Testdrive version or two WPs using the same database’ is closed to new replies.