I have inherited a Drupal 6 site to maintain.

I am new to Drupal so there is an element of learning as I go.

I have encountered a strange issue after attempting to set up a test site on my local machine.

All my links on my local site continue to point to the live server. So any menus, login buttons etc all point towards live site.

Steps I have taken:

  • checked settings.php to ensure that $base_url is set to "http://localhost:456"

  • checked settings.php to ensure that MySQL settings are correct

  • Taken an SQL dump of the entire local database and searched for any references to live site URL

  • deleted all the local cache data from database

  • Checked various blocks to ensure that there was no hard coding of links

  • Disabled language support as that does use separate URLS for each language

I am at a total loss as to where to go from here. I can navigate through the site locally by replacing the url in the address bar to point to the local site, and I have even managed to change the local theme so I can see which version of teh site Im on. The fact that I could do this means that the database is set up correctly.

Totally stumped as to where to go from here. Any takers??

2 Answers 2


Make sure you updated the $base_url to reflect to you local server name in settings.php. Also check if your menu system is using absolute path.

  • Thanks for the answer but I clearly indicated that I have tried both of these actions in my list of steps that I have taken Jun 15, 2012 at 12:02
  • Did you clear your cache. If you have drush installed try drush cc all. Maybe you are getting cached data. Jun 15, 2012 at 12:19
  • Could you also tell us what is your environment? Jun 15, 2012 at 12:20
  • Locally running IIS 7.5 with a MySQL database, and drupal 6.20 Jun 15, 2012 at 12:57
  • Is this module installed: drupal.org/project/abssrc ? Is there any JS that may be changing links from relative to absolute?
    – keva
    Jun 15, 2012 at 13:25

the issue was being caused by the default language being set from the 'variable' table. The URL associated with this language was pointing my local site to my remote server.

I had changed the URL to localhost directly in the languages table, but it turns out Drupal also stores this information in the 'variable' table.

1 thing to note if anyone decides to change a value in the variable table, be sure to change the metadata for the variable as well as the value.in my case S:22 had to be changed to S:21

i.e. the original value was a string of 22 characters, whereas the new one was a string of 21 characters

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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