Title: Local Development URLs
Last modified: August 22, 2016

---

# Local Development URLs

 *  [Ryan Marks](https://wordpress.org/support/users/rmarks/)
 * (@rmarks)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/local-development-urls/)
 * Hello,
 * I am running a WordPress Network running on WordPress 4.1 with the WordPress 
   MU Domain Mapping plugin. I have currently asked our developers to edit their
   hosts file so they can connect to the development environment. The team is becoming
   frustrated with toggling the hosts file on (for development) and off (for production).
 * I’m proposing the following idea to make it easier for the team to jump between
   development and production:
    - Add an additional domain on the /wp-admin/tools.php?page=domainmapping page
      for the development environment
    - In the wp-config.php, define a constant stating which environment we’re in
    - If we’re in development, set the development hostname as primary
 * Will this work?
 * Is there an easier way to do this?
 * Thank you,
    Ryan
 * [https://wordpress.org/plugins/wordpress-mu-domain-mapping/](https://wordpress.org/plugins/wordpress-mu-domain-mapping/)

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

 *  Plugin Author [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/local-development-urls/#post-5792820)
 * Why not use development domains in your development environment instead of the
   real domains? When you are using your hosts file the host does not need to be
   a legitimate domain.
 * ex. actual domain is exampledomain.com, dev domain is exampledomain.loc.
 *  Thread Starter [Ryan Marks](https://wordpress.org/support/users/rmarks/)
 * (@rmarks)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/local-development-urls/#post-5792863)
 * Hi Ron,
 * I had intended to use a .lot or .dev domain. Sorry for not making that clear.
   What I had concerns about was being redirected from the development domain to
   the primary hostname for that Blog. Do you have a suggestion for how to overcome
   this issue?
 * Thank you,
    Ryan
 *  Plugin Author [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/local-development-urls/#post-5792864)
 * > Do you have a suggestion for how to overcome this issue?
 * Use .loc for that as well.
 *  Thread Starter [Ryan Marks](https://wordpress.org/support/users/rmarks/)
 * (@rmarks)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/local-development-urls/#post-5792865)
 * My goal is to use production data from the database in the development environment.
   I know this isn’t a standard way of doing local development, but this is the 
   scenario I’m in.
 * If I’m going to change the hostname of the network and each blog from .com to.
   loc, these are the places I think I will need to update:
    - wp_#_options.option_value
    - wp_#_postmeta.meta_value
    - wp_blogs.domain
    - wp_domain_mapping
    - wp_site.domain
    - wp_sitemeta.meta_value
 * I also plan to edit wp-config.php to have DOMAIN_CURRENT_SITE and NETWORK_ADMIN_URL
   use mynetworkdomain.loc.
 * Am I missing any other places to change?
 * Thank you,
    Ryan

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

The topic ‘Local Development URLs’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-mu-domain-mapping.svg)
 * [WordPress MU Domain Mapping](https://wordpress.org/plugins/wordpress-mu-domain-mapping/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-mu-domain-mapping/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Ryan Marks](https://wordpress.org/support/users/rmarks/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/local-development-urls/#post-5792865)
 * Status: not resolved