I've developed a website and deployed it in a server, I consider this server as a test server. Now, I'm in the final stage of development and I'm looking to move the website content to new server. In that process, I've moved my website contents from test server to the new server, updated the database details in settings.php file, created a database in the new server and imported the .sql file (from the test server). I anticipate all the cloning work is done.

Now, when I look into the new site, the home page appears in the old format - I mean most of the edits that I made have gone. When I click on the menu tabs, the corresponding pages are broken - there is no proper redirection to the pages.

What I've observed was, in the homepage the url was good but when I click on one of the links the url is pointing to something odd like - localhost/new_mywebsite/search. I feel that this is odd. I couldn't trace why it was showing in that way.

Moreover, when i compared the new database with old database(test server) the old one has around 130 tables and the new one has only 90 tables. Even it seems odd for me.

What might the real reason for this odd behaviour? Is it with database or links?

1 Answer 1


I had this same problem recently, and it took me forever to figure out. What you have to do is make sure the database at your new location is empty. You have to have a database, and it has to be an empty database. Of course, do still make sure your settings.php info is correct, as you did the first time around. Then run install.php and go through the normal steps. Once that is complete, then import all of the tables from the old database into the new database.

The reason for this is that Drupal caches the database connection information, so if you change that in settings.php, it will continue using the old information until you run install.php. And you can only run install.php if you’re pointing the site at a fresh database.

EDIT: Sorry, I missed part of your post. You need to also make sure that your base_url settings in settings.php are set up for the live domain.

  • It was a good solution, but it didn't work for me. The database has same issue, after importing the .sql file there were only 90 tables.
    – GIRI
    Nov 11, 2014 at 3:38
  • 1
    In that case it sounds like you did not export a complete backup of your tables.
    – rrr45
    Nov 11, 2014 at 14:21
  • you are right. I tried to dump database again and used the new dump to export. It works take a charm thank you
    – GIRI
    Nov 11, 2014 at 17:31
  • Great. Glad I could help.
    – rrr45
    Nov 11, 2014 at 17:45

Your Answer

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

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