Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
  • I have installed drupal on my localmachine(ubuntu, Xampp), at localhost.
  • Path and Pathauto modules are active (a module to produce friendly URLs).

Migrating/Pushing my local install to the www.mysite.com

  • Exported SQL from phpMyadmin(localhost).
  • Made a new DB at live site (I think a different name from the localhost-DB does not create any problem).
  • Imported SQL into phpMyadmin, (mysite).
  • Changed the username-password-DBname in the sites/default/settings.php in drupal folder.
  • Now, uploaded the drupal folder and all its content into the /www of the "mysite.com".

Visited the URL www.mysite.com, site looks same as on my localhost, good.

But --

  1. I made a tryPage on my localhost/drupal, for which pathauto(cleanURL) recommended the URL "content/trypage" which i explicitly changed to "trypage", so that absolute link to the page is "localhost/drupal/trypage" and not "localhost/drupal/content/trypage".
    Now When i click the trypage link on the mysite, it open's it in-reference to my localhost, my local-pages are opened. That is, when I click newpage on the mysite.com, the URL requested is "localhost/drupal/newpage" and not "www.mysite.com/newpage".

    Do you think it is coz of the SEO friendly URL generation issue, the Pathauto module.

    Anyways how do i solve this
    If I make my "localhost/drupal" to open from same URL (mysite.com), i dont know how to do that exactly, i think by configuring vhosts. But if i do that, then the URL www.mysite.com where will it take me, local or online.

  2. Now If i add new modules, new content, new pages, and new books on my localhost site, and wish to update mysite.com, do i have to redo SQL export/import everytime, and use a software like rsync/sitecopy(), to upload the folders on the live site. How do i solve this.
share|improve this question

3 Answers 3

First and foremost, make sure you have mod_rewrite enabled. You also need to change the base URL in /sites/default/settings.php

share|improve this answer
    
yes mod_rewrite is enabled, as i guess ie y pathauto works. 2. "$base_url = 'mysite.com'";; does adding this line will do. any specific place to add this. thanks –  Vivek Sharma Aug 17 '09 at 14:00
    
$base_url = 'example.com';; // NO trailing slash! –  geeklin Aug 17 '09 at 14:04
    
$base_url = http: // mysite.com –  Vivek Sharma Aug 17 '09 at 14:05
    
which setting.php needs the base_url change, the one on localmachine or the one on live-site –  Vivek Sharma Aug 17 '09 at 14:16
    
On the live site –  geeklin Aug 17 '09 at 15:43

I suspect if you clear the cache on the live site then you'll find the links suddenly point to the right server. I've seen instances where menu entries were generated on a copied site which pointed to the old URL.

I generally have Devel and Admin Menu modules so "Flush caches" is right there in the top left admin_menu menu. Or you could simply not include the cache_* tables when you copy your MySQL up.

Good luck.

share|improve this answer

"content/title" in the pathauto URL looks like the out-of-the-box default. Check the configuration for pathauto->nodes.

Also, cache-clearing, as Chris suggests. It can correct many odd problems.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.