Support » Fixing WordPress » Running a test environment

  • Hi all,

    So I’m trying to redesign my site. To test things out, I’ve set up a separate instance of WP on a separate directory, a /test. The thing is, I got all the design set up and such, but I’d like to see what things look like when populated with the same content as my main site. Is there a way to import the main site db into the test site, without disturbing anything on the main site?

    In the end, I’m just making a new theme, and when I’m good and ready, I’ll just move the theme over to the main site and activate. But until then, I’d like to know how things look with content. Any way to do this?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Mark (podz)


    Support Maven

    Export the database from the existing site.
    Import the database into the new site
    then, before you even look once at it, you use phpmyadmin to make sure the siteurl and home values in the database are correct for the new/test site.

    If you can, set up a separate database for the test, not a shared one. It does work with a shared one but if you can have distinct it’s better.

    Some info here may help:

    I suppose you could export your database, and then import it into your test site.
    For my test site, I simply created several cats, and used Lorem ipsum to generate content, added in a block quote, a unorder list, and a few comments on a post so you can see most of the different issues that can come up when styling.

    If this is just for theme testing, simplest method is to install the ThemeSwitcher plugin:

    Then to switch to your *test* theme (without adding the plugin’s template tag), use an url query like: of Theme

    ’tis what I do, berry simple, berry easy.

    Okay… I try to download the plugin, but the link somehow takes me to the guy’s main page. Doesn’t seem to be anything to download there. Sounds likenice and easy way to fix this, but eh… well, does anyone else have somewhere I can download the thing?

    Ok, that worked. Sort of. See, I’m not designing this thing, a guy is doing it for me, since I know nothing. Now, he’s asking me if there’s a way to use the main db, on the test site, to see if anything on the old posts will look borked. I thought this theme-switcher thing would be a good solution… but things crapped.

    Now, let me explain how I’m set up. I have two databases. One, running the main blog. Another, running the test blog on a separate directory. I’ve been able to do everything I want in that test environment so far. I only want to see if any of the main db posts will look funny when I do the switch. Now, when i exported the main db, and imported into the test site, at first, nothing happened. Then, I dropped all the tables and tried re-importing. That broke the test site, so I had to do a re-install.

    So, is there something in the main db that would need adjusting to work properly on the test directory? pw change? Username change?

    Mark (podz)


    Support Maven

    ‘broke’ ?

    You will probably have to copy everything over. In the database, when you click to see the test site it first goes looking for active plugins and loads them, then it checks the theme and loads that as a minimum. So if the theme it expects is not there, you will see nothing.

    So what you really need to do to make this copy is actually copy everything. Try with just copying the plugins and themes, and don’t forget about changing the siteurl and home vales too.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Running a test environment’ is closed to new replies.