Change URL of site, server and folder remains the same I want access an old site on a new domain. The server and folder remains the same. I have pointed the new domain to the old Drupal site and updated settings.php to include

$base_url = 'http://www.newurl.com';


I can access the site, but all links in the theme and in the control panel point to http://oldurl.com. I can navigate around the site by manually altering each URL to reflect the new domain.

I'm under the impression that updating base_url should work, and take effect immediately. Have I missed something?
Seems the website was coded using absolute paths, which is not really good practice from Drupal coding standard's perspective. Please read the discussion on Absolute or relative URLs?. Your case is covered by the accepted answer:


  When moving a site from dev > staging > production a Wordpress site's
  URLs and image references have to be replaced in the DB, this can
  create an absolute mess.


Though Wordpress is mentioned, that concerns any type of websites, including Drupal.

Anyway, to address the issue you need to do two things:


Look for and replace all the instances of your old domain in the active theme's template folder. This is easier part as any decent text editor has Find&amp;Replace feature. 


Check the website again and if everything is working then you are lucky. If not proceed to the second step.


Search and replace all the instances of your old domain in the database tables. You can do it either using drush or UI like phpMyAdmin. The query is pretty simple:

UPDATE table_name SET field_name = replace(field_name, 'old-domain', 'new-domain');


To do so you first need to figure out the tables where your old domains could be stored. Most probably those are 'node' and 'comment' tables and their last revisions, however if content types have additional custom fields then more tables are involved. You could perform quick search for the old domain in the database to find all the tables where it is stored.

If step 2 is involved, then I would also suggest, using the opportunity, to turn all your paths from absolute to relative. In that case, you would run:

`UPDATE table_name SET field_name = replace(field_name, 'old-domain/', '/');`


instead.

I hope this helps.