WordPress.org

Ready to get started?Download WordPress

Forums

Adding a test or development environment (10 posts)

  1. doubledubs
    Member
    Posted 8 years ago #

    So, before I do upgrades or anything, I've added a subdomain with wordpress installed. (test.domain.com)

    If I want to duplicate the environment at "domain.com" into "test.domain.com" what do I do?

    I'm guessing all I need to do is
    1) back-up "domain.com" and restore the back-up into "test.domain.com"
    2) move all the plug-ins and themes (basically copy the folders as is).

    Will this pretty much do it? Is there a way to easily dubplicate the environment so it mirrors real time? If not, I don't mind using a point in time test environment.

    Also, I assume this is an adequate way to test out upgrades, patches, new themes, plugins, etc...

    Sorry if this has been posted before but I couldn't find it. Thanks!!!!

  2. schestowitz
    Member
    Posted 8 years ago #

    * Backup "domain.com"

    * I advise that you create a new database for "test.domain.com" to avoid its manipulation from two installations

    * Copy wo-settings file from "domain.com" and change to fit the new database

    * Install WordPress

    * Overwrite new database with the old one (be careful with their names, cPanel overwrites based on filename)

    I suggest you don't mirror anything.

  3. moshu
    Member
    Posted 8 years ago #

    Copy wo-settings file...
    schestowitz meant: wp-config.php file :)

  4. schestowitz
    Member
    Posted 8 years ago #

    Oops. Typo, wrong filename and left out extension, which was intentional.

  5. doubledubs
    Member
    Posted 8 years ago #

    You guys are so fast it's amazing. Thank you.

    I assume the following will be straightforward? (just making sure DB names are correct and stuff)

    "Overwrite new database with the old one (be careful with their names, cPanel overwrites based on filename)"

  6. schestowitz
    Member
    Posted 8 years ago #

    What I meant to say is that when you restore the database, make sure it replaces the new (void) database and not the old one. It tends to 'think' that this is what you want, at least under cPanel and the service it uses underneath. Be backup paranoid at this stage. I know I would.

    Good luck!

  7. doubledubs
    Member
    Posted 8 years ago #

    ok - everything worked as planned - "domain.com" is intact (and heavily backed up using both automated and manual processes).

    One glitch - "test.domain.com" exists. However, "test.domain.com/wp-admin" redirects me to "domain.com/wp-admin" I guess I missed one somewhere. Can you tell me where this is? and how do I fix it if I can't get to the admin page? If I need to re-run the process, not a big deal - it was not labor intensive.

    Thank You!!!

  8. doubledubs
    Member
    Posted 8 years ago #

    OK - so I'm back at this this morning and beginning to think that backing up the DB into a subdomain wasn't the best way. Why? Well, I'm still having issues with the "test.domain.com/wp-admin" redirecting to "domain.com/wp-admin" The other thing is that when I copied the wp-content folder over (all plugins and templates) all hyperlinks on the test page link to the main domain. Logically this should not happen as the sidebar.php doesn't point to "domain.com" specifically. I just can't figure it out. So perhaps the redirects are all sitting in the DB somewhere. Just an FYI - I did follow all instructions above including the wp-config.php.

    I was hoping to be able to do screenshots as a reference for anyone who wanted to try this, but if I don't figure this out in the next hour, I'm going to plan B. Plan B is simply to export my posts and import them into "test.domain.com." I'd manually configure the plug-ins and themes to match (mostly copying as well). If I ever get it to work, I'll provide some screenprints and instructions for what I did.

    If anyone has an idea about the cause of the redirects (that is easy to solve) let me know.

    THANKS!!! HAPPY HOLIDAYS!!!

  9. moshu
    Member
    Posted 8 years ago #

    You have to change the site_url and home values in the options table, see this guide:
    http://www.tamba2.org.uk/wordpress/site-url/
    (if the DB was imported it has the old=root values; change them to reflect the new install)

  10. doubledubs
    Member
    Posted 8 years ago #

    Thanks - that works perfectly now... and I don't even have to do screenshots since someone already did it!!!

Topic Closed

This topic has been closed to new replies.

About this Topic