Answers.Body: <p>The advice in the documention is fairly old and much of it is no longer appropriate. In the most recent CiviCRM versions, more and more of the url settings are automatically calculated from the 'base url' and are relatively easy to update just by editing the CIVICRM_UF_BASEURL in your civicrm.settings.php file, and then clearing your caches for good measure. In fact, most of the time you don't even have to worry about that, you can access much of your civicrm from multiple domains (e.g. with and without www). Of course, that's not usually a good idea, and the one key time that the settings file matters is when your civicrm is invoked via a non-CMS entry point (e.g. the click-through tracking url from CiviMail).</p>
  
  <p>Usually, it's when you also have to change file locations that it gets the most icky.</p>
  
  <p>The one recent gotcha I've seen is a ckeditor security check for file uploads that will break things in a small way if you don't have the file locations right (e.g. you need the actual file path instead of a symlinked one). But that's a digression for completeness and unrelated to your question....</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-06T18:55:23.590Z
Answers.Text: Thank you so much for the reassurance, Alan. I was also thinking of adding a 301 redirect in the .htaccess, something like:
Answers.UserDisplayName: Karl Rudnick
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-06T18:57:26.640Z
Answers.Text: RewriteEngine on
          RewriteCond %{HTTP_HOST} ^bikewalkpoway\.sdcbcdream\.org$
          RewriteRule ^/?$ "http\:\/\/bikewalkpoway\.org\/" [R=301,L]
Answers.UserDisplayName: Karl Rudnick
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-06T18:58:55.480Z
Answers.Text: [Sorry, I don't know how to do a line feed in this comment dialog] I was just thinking there might be some lingering URL references buried somewhere and this might help. Or would it hurt?
Answers.UserDisplayName: Karl Rudnick
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-06T19:10:36.720Z
Answers.Text: I might add that the original subdomain will also stay live. I would want/hope either wewantthis.testdomain.org OR wewantthis.org to work, but would like to only see wewantthis.org to appear in the browser address, especially in the front-facing interface. It would be less confusing to CiviCRM and WordPress admins to also just see wewantthis.org in the address bar on back-end pages.
Answers.UserDisplayName: Karl Rudnick
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-07T15:19:34.130Z
Answers.Text: Yes, a redirect in the .htaccess (or apache config) to redirect all requests to your 'canonical' domain is a very good idea for two reasons:  
  
  1. SEO - you want google to be spidering your site at only one domain.  
  
  2. Authentication - relies on a cookie tied to the domain, so if you switch domains during a session, it looses it's authentication.  
  
  You can do this and maintain the path portion of the request so that old links to sub pages maintain the same function/content.
Answers.UserDisplayName: Alan Dixon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-06T14:56:40.453Z
Answers.LastActivityDate: 2016-12-06T14:56:40.453Z
Answers.UserDisplayName: Alan Dixon
Body: <p>We have been setting up a <code>WordPress + CiviCRM</code> installation on a test subdomain, let's call that <code>wewantthis.testdomain.org</code>.</p>
  
  <p>I also have a domain name <code>wewantthis.org</code> that I wish to simply point to the exact same installation directory as <code>wewantthis.testdomain.org</code>, but with (hopefully minor) changes to settings and the database as we are not changing servers or even file locations on the server. </p>
  
  <p>Note that I can do this easily for Wordpress only by </p>
  
  <ol>
  <li>using phpMyAdmin to modify the wp_options table's "siteurl" and "home" rows to point to wewantthis.org; </li>
  <li>fire up WP/wp-admin and run a Wordpress plug-in "Velvet Blues Update URLs";</li>
  <li>under WP > Settings, change the Site Address and WordPress Address to wewantthis.org. That is all there is to it. Btw, for reasons I don't want to go into, I'm not interested in a redirect solution.</li>
  </ol>
  
  <p>Is there something similar I can do for the CiviCRM database and settings? I've read some Q/A's regarding both moving the server and changing URL, but they seem to suggest a completely new install of CiviCRM and starting over, but at least making use of the previous database, whose creation was the bulk of the work.</p>
  
  <p>Any advice would be appreciated as we have a test configuration that we want to go live by simply changing DNS pointers from the existing wewantthis.org (no CiviCRM) to our new one that will have CiviCRM fully integrated.</p>
  
  <p>Thanks to the experts out there. This is our first CiviCRM setup.</p>
  
Tags: <wordpress><urls>
Title: Change URL only on WordPress+CiviCRM
ThreadText: # Change URL only on WordPress+CiviCRM
  
  (Asked by: username_0 on 2016-12-06)
  
  We have been setting up a `WordPress + CiviCRM` installation on a test subdomain, let's call that `wewantthis.testdomain.org`.
  
  I also have a domain name `wewantthis.org` that I wish to simply point to the exact same installation directory as `wewantthis.testdomain.org`, but with (hopefully minor) changes to settings and the database as we are not changing servers or even file locations on the server.
  
  Note that I can do this easily for Wordpress only by
  
  1. using phpMyAdmin to modify the wp\_options table's "siteurl" and "home" rows to point to wewantthis.org;
  2. fire up WP/wp-admin and run a Wordpress plug-in "Velvet Blues Update URLs";
  3. under WP > Settings, change the Site Address and WordPress Address to wewantthis.org. That is all there is to it. Btw, for reasons I don't want to go into, I'm not interested in a redirect solution.
  
  Is there something similar I can do for the CiviCRM database and settings? I've read some Q/A's regarding both moving the server and changing URL, but they seem to suggest a completely new install of CiviCRM and starting over, but at least making use of the previous database, whose creation was the bulk of the work.
  
  Any advice would be appreciated as we have a test configuration that we want to go live by simply changing DNS pointers from the existing wewantthis.org (no CiviCRM) to our new one that will have CiviCRM fully integrated.
  
  Thanks to the experts out there. This is our first CiviCRM setup.
  
  **Tags:** wordpress, urls
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-12-06. Score: 2
  
  The advice in the documention is fairly old and much of it is no longer appropriate. In the most recent CiviCRM versions, more and more of the url settings are automatically calculated from the 'base url' and are relatively easy to update just by editing the CIVICRM\_UF\_BASEURL in your civicrm.settings.php file, and then clearing your caches for good measure. In fact, most of the time you don't even have to worry about that, you can access much of your civicrm from multiple domains (e.g. with and without www). Of course, that's not usually a good idea, and the one key time that the settings file matters is when your civicrm is invoked via a non-CMS entry point (e.g. the click-through tracking url from CiviMail).
  
  Usually, it's when you also have to change file locations that it gets the most icky.
  
  The one recent gotcha I've seen is a ckeditor security check for file uploads that will break things in a small way if you don't have the file locations right (e.g. you need the actual file path instead of a symlinked one). But that's a digression for completeness and unrelated to your question....
  
  > **Comments:**
  > **username_0**: Thank you so much for the reassurance, Alan. I was also thinking of adding a 301 redirect in the .htaccess, something like:  
  > **username_0**: RewriteEngine on         RewriteCond %{HTTP_HOST} ^bikewalkpoway\.sdcbcdream\.org$         RewriteRule ^/?$ "http\:\/\/bikewalkpoway\.org\/" [R=301,L]  
  > **username_0**: [Sorry, I don't know how to do a line feed in this comment dialog] I was just thinking there might be some lingering URL references buried somewhere and this might help. Or would it hurt?  
  > **username_0**: I might add that the original subdomain will also stay live. I would want/hope either wewantthis.testdomain.org OR wewantthis.org to work, but would like to only see wewantthis.org to appear in the browser address, especially in the front-facing interface. It would be less confusing to CiviCRM and WordPress admins to also just see wewantthis.org in the address bar on back-end pages.  
  > **username_1**: Yes, a redirect in the .htaccess (or apache config) to redirect all requests to your 'canonical' domain is a very good idea for two reasons:    1. SEO - you want google to be spidering your site at only one domain.    2. Authentication - relies on a cookie tied to the domain, so if you switch domains during a session, it looses it's authentication.    You can do this and maintain the path portion of the request so that old links to sub pages maintain the same function/content.  
  
  ---
  
  