Title: development versus live hostnames
Last modified: January 30, 2017

---

# development versus live hostnames

 *  [juanbro](https://wordpress.org/support/users/juanbro/)
 * (@juanbro)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/development-versus-live-hostnames/)
 * I’d like to use a development hostname (dev.example.com) and then move work to
   a live hostname (www.example.com). This seems to be a pain, with lots of manual
   edits required. ([https://codex.wordpress.org/Changing_The_Site_URL](https://codex.wordpress.org/Changing_The_Site_URL))
 * Is there an easier way? Seems like this should be simple.
 * Thanks!

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

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [9 years, 4 months ago](https://wordpress.org/support/topic/development-versus-live-hostnames/#post-8716773)
 * If you are not physically moving anything, then it’s a matter of 20 seconds with
   the “better search and replace” plugin, once your host and/or DNS is set to resolve
   things correctly.
 *  Thread Starter [juanbro](https://wordpress.org/support/users/juanbro/)
 * (@juanbro)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/development-versus-live-hostnames/#post-8717283)
 * Files would be moved from dev to live directory
 *  [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/development-versus-live-hostnames/#post-8717447)
 * You might try the SQL code in my post here:
    [https://wordpress.org/support/topic/copying-a-wordpress-site-into-localhost-for-testing/?replies=3#post-7868664](https://wordpress.org/support/topic/copying-a-wordpress-site-into-localhost-for-testing/?replies=3#post-7868664)
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [9 years, 4 months ago](https://wordpress.org/support/topic/development-versus-live-hostnames/#post-8717525)
 * This is the way… [https://codex.wordpress.org/Moving_WordPress](https://codex.wordpress.org/Moving_WordPress)
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/development-versus-live-hostnames/#post-8719052)
 * I feel that it’s important to point out that, while leejosepho’s code will likely
   work for many installations, there’s a reasonable chance it will not. As explained
   in Steve’s link:
 * > If you do a search and replace on your entire database to change the URLs, 
   > you can cause issues with data serialization, due to the fact that some themes
   > and widgets store values with the length of your URL marked. When this changes,
   > things break.
 * leejosepho’s code searches the 3 locations where URLs reliably exist in a default
   installation, but they are known to occur in other locations when certain plugins
   or themes are used. He did say “try” his code, implying that it might not work
   for you. One of the methods listed on the source page after the above quote will
   reliably work in all cases.
 *  [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/development-versus-live-hostnames/#post-8720063)
 * The code I posted will work, and there is very little chance of it causing any
   trouble since I have already removed a fourth line that could have caused the
   trouble you have mentioned. The plugin trouble I have occasionally had apart 
   from anything that code can do has been caused by the fact of a given plugin 
   using “absolute server path” and needing to be removed and re-installed to reset
   it.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/development-versus-live-hostnames/#post-8721595)
 * [@leejosepho](https://wordpress.org/support/users/leejosepho/) – It will not 
   work completely in all instances. We are beyond what the OP cares about though.
   If you would like to continue discussing, DM me in [WordPress Slack](https://make.wordpress.org/chat/)–
   same user name. I can explain further, or you can convince me further 🙂
 *  Thread Starter [juanbro](https://wordpress.org/support/users/juanbro/)
 * (@juanbro)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/development-versus-live-hostnames/#post-8721658)
 * Thank you all for your replies. Looks like there are a couple of plugins that
   may do what I want, but both come with some caveats from the developers:
 * [https://wordpress.org/plugins/dynamic-hostname/](https://wordpress.org/plugins/dynamic-hostname/)
   
   [https://wordpress.org/plugins/any-hostname/](https://wordpress.org/plugins/any-hostname/)

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

The topic ‘development versus live hostnames’ is closed to new replies.

## Tags

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

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 8 replies
 * 4 participants
 * Last reply from: [juanbro](https://wordpress.org/support/users/juanbro/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/development-versus-live-hostnames/#post-8721658)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
