Answers.Body: <p>Craft makes it easy to handle multiple environments, but you need to make it aware about the differences. Usually it's smart enough to enough to know the base folder path that you have it hosted in.</p>
  
  <p>It's also smart enough to usually which url's you want. Sometimes it doesn't properly remove index.php from the URL, and that you can manually override with the setting <a href="http://buildwithcraft.com/docs/multi-environment-configs" rel="nofollow">omitScriptNameInUrls</a>.</p>
  
  <p>Since your public folder is named <strong>public_html</strong>, it's not clear from your question if you are running with the standard folder structure (index.php located in public folder, $craftPath inside index.php pointing to <strong>craft/</strong> folder one level above public folder).</p>
  
  <p>In general, you should have a look at the documentation regarding multi-environment configuration.</p>
  
  <p>The one other area where it's usually necessary to set environment specific settings is Asset sources: Check out the <a href="http://buildwithcraft.com/docs/multi-environment-configs#environment-specific-variables" rel="nofollow">chapter on that in the docs</a> as well.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-17T08:27:43.707Z
Answers.LastActivityDate: 2014-10-17T10:07:52.150Z
Answers.LastEditDate: 2014-10-17T10:07:52.150Z
Answers.UserDisplayName: Fred Carlsen
Body: <p>I have my first craft website all working great on my local dev server and want to move it to the production server. I think I went about this the wrong way but I installed a fresh install of craft on the pro server then purchased a pro license.key. This all installed OK. This is the same root level structure as the local dev version.</p>
  
  <p>I made sure both sites were upto date then copied over my database dump from dev and uploaded my templates. However this has broken the URLs (the home page loads). Have I missed something?</p>
  
  <p>The production server doesn't have the domain pointing at it but can be view via the IP like so.</p>
  
  <p><code>http://79.170.40.48/mydomain.co.uk/</code>    &lt;-- though it does require the trailing lash</p>
  
  <p>The odd bit is if I visit the link </p>
  
  <p><code>http://79.170.40.48/mydomain.co.uk/products</code></p>
  
  <p>the browser address bar says </p>
  
  <p><code>http://79.170.40.48/mydomain.co.uk/products</code></p>
  
  <p>the apache error says the requested URL is
  <code>/home/sites/mydomain.co.uk/public_html/index.php</code> was not found on this server.</p>
  
  <p>And curiously the <code>/home/sites/</code> address is what my my local dev path is. So where is the remote product install getting this from?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-10-17T00:28:41.357Z
Comments.Text: Have you checked your config file (`craft/config/general.php`)? It sounds like perhaps your `siteURL` and `environmentVariables` are set with your local dev settings.
Comments.UserDisplayName: Douglas McDonald
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-10-17T06:29:02.260Z
Comments.Text: Thanks Douglas - but the general.php has no settings.
  As in empty. return array( );
Comments.UserDisplayName: Taylermade
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-10-17T08:20:50.093Z
Comments.Text: In your public_html, do you have your index.php file, and does it point to the correct location for craft? Where is the craft/ folder located? 1 level above public_html? Or did you change things around?  If you open up your local index.php file, you will see $craftPath on line 4. Make sure that reflect to where Craft is located in your folder structure.
Comments.UserDisplayName: Fred Carlsen
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-10-17T10:54:20.460Z
Comments.Text: Thanks Fred. My folder structure is as default only the public is named public_html. public_html is the web root and craft sits one level above. index.php in webfoot = `$craftPath = '../craft';
  Also - this all works locally.
Comments.UserDisplayName: Taylermade
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-10-17T15:51:31.423Z
Comments.Text: Checked craft.log? Tried turning on devMode? Is your .htaccess file in place? Are you able to access the control panel?
Comments.UserDisplayName: Fred Carlsen
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-10-18T11:03:46.747Z
Comments.Text: I can access the control panel by adding the index.php to the URL. All of the pages are available if I do this. The .htacess file is in place and just as local dev. What show I be looking for in the console with dev mode on? manually override with the setting omitScriptNameInUrls breaks links to my CSS. Thanks!
Comments.UserDisplayName: Taylermade
Tags: <url><install><migration>
Title: Where are all the references to the URL stored?
ThreadText: # Where are all the references to the URL stored?
  
  (Asked by: username_0 on 2014-10-16)
  
  I have my first craft website all working great on my local dev server and want to move it to the production server. I think I went about this the wrong way but I installed a fresh install of craft on the pro server then purchased a pro license.key. This all installed OK. This is the same root level structure as the local dev version.
  
  I made sure both sites were upto date then copied over my database dump from dev and uploaded my templates. However this has broken the URLs (the home page loads). Have I missed something?
  
  The production server doesn't have the domain pointing at it but can be view via the IP like so.
  
  `http://79.170.40.48/mydomain.co.uk/` <-- though it does require the trailing lash
  
  The odd bit is if I visit the link
  
  `http://79.170.40.48/mydomain.co.uk/products`
  
  the browser address bar says
  
  `http://79.170.40.48/mydomain.co.uk/products`
  
  the apache error says the requested URL is
  `/home/sites/mydomain.co.uk/public_html/index.php` was not found on this server.
  
  And curiously the `/home/sites/` address is what my my local dev path is. So where is the remote product install getting this from?
  
  **Tags:** url, install, migration
  
  > **Comments:**
  > **username_1**: Have you checked your config file (`craft/config/general.php`)? It sounds like perhaps your `siteURL` and `environmentVariables` are set with your local dev settings.  
  > **username_0**: Thanks username_1 - but the general.php has no settings. As in empty. return array( );  
  > **username_2**: In your public_html, do you have your index.php file, and does it point to the correct location for craft? Where is the craft/ folder located? 1 level above public_html? Or did you change things around?  If you open up your local index.php file, you will see $craftPath on line 4. Make sure that reflect to where Craft is located in your folder structure.  
  > **username_0**: Thanks username_2. My folder structure is as default only the public is named public_html. public_html is the web root and craft sits one level above. index.php in webfoot = `$craftPath = '../craft'; Also - this all works locally.  
  > **username_2**: Checked craft.log? Tried turning on devMode? Is your .htaccess file in place? Are you able to access the control panel?  
  > **username_0**: I can access the control panel by adding the index.php to the URL. All of the pages are available if I do this. The .htacess file is in place and just as local dev. What show I be looking for in the console with dev mode on? manually override with the setting omitScriptNameInUrls breaks links to my CSS. Thanks!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2014-10-17. Score: 1
  
  Craft makes it easy to handle multiple environments, but you need to make it aware about the differences. Usually it's smart enough to enough to know the base folder path that you have it hosted in.
  
  It's also smart enough to usually which url's you want. Sometimes it doesn't properly remove index.php from the URL, and that you can manually override with the setting [omitScriptNameInUrls](http://buildwithcraft.com/docs/multi-environment-configs).
  
  Since your public folder is named **public\_html**, it's not clear from your question if you are running with the standard folder structure (index.php located in public folder, $craftPath inside index.php pointing to **craft/** folder one level above public folder).
  
  In general, you should have a look at the documentation regarding multi-environment configuration.
  
  The one other area where it's usually necessary to set environment specific settings is Asset sources: Check out the [chapter on that in the docs](http://buildwithcraft.com/docs/multi-environment-configs#environment-specific-variables) as well.
  
  
  ---
  
  