Title: Adding a test or development environment
Last modified: August 18, 2016

---

# Adding a test or development environment

 *  [doubledubs](https://wordpress.org/support/users/doubledubs/)
 * (@doubledubs)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/adding-a-test-or-development-environment/)
 * 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!!!!

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [schestowitz](https://wordpress.org/support/users/schestowitz/)
 * (@schestowitz)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/adding-a-test-or-development-environment/#post-300137)
 * * 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.
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/adding-a-test-or-development-environment/#post-300139)
 * _Copy wo-settings file…_
    schestowitz meant: `wp-config.php` file 🙂
 *  [schestowitz](https://wordpress.org/support/users/schestowitz/)
 * (@schestowitz)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/adding-a-test-or-development-environment/#post-300140)
 * Oops. Typo, wrong filename and left out extension, which was intentional.
 *  Thread Starter [doubledubs](https://wordpress.org/support/users/doubledubs/)
 * (@doubledubs)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/adding-a-test-or-development-environment/#post-300141)
 * 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)”
 *  [schestowitz](https://wordpress.org/support/users/schestowitz/)
 * (@schestowitz)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/adding-a-test-or-development-environment/#post-300142)
 * 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!
 *  Thread Starter [doubledubs](https://wordpress.org/support/users/doubledubs/)
 * (@doubledubs)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/adding-a-test-or-development-environment/#post-300165)
 * 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!!!
 *  Thread Starter [doubledubs](https://wordpress.org/support/users/doubledubs/)
 * (@doubledubs)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/adding-a-test-or-development-environment/#post-300315)
 * 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!!!
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/adding-a-test-or-development-environment/#post-300319)
 * 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/](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)
 *  Thread Starter [doubledubs](https://wordpress.org/support/users/doubledubs/)
 * (@doubledubs)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/adding-a-test-or-development-environment/#post-300327)
 * Thanks – that works perfectly now… and I don’t even have to do screenshots since
   someone already did it!!!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Adding a test or development environment’ is closed to new replies.

## Tags

 * [development](https://wordpress.org/support/topic-tag/development/)
 * [environment](https://wordpress.org/support/topic-tag/environment/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 9 replies
 * 3 participants
 * Last reply from: [doubledubs](https://wordpress.org/support/users/doubledubs/)
 * Last activity: [20 years, 5 months ago](https://wordpress.org/support/topic/adding-a-test-or-development-environment/#post-300327)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
