I have a drupal install on a test subdomain, and when I tried moving it to the root domain, nothing worked. I had no absolute links that I was aware of, and both domains are on the same host...so I don't see why this didn't work.

No details have to be changed...still the same db and host and everything....is there any wasy way to fix this?


Make sure you have a backups and make sure the backups work. Then empty the database cache tables (cache, cache_block, cache_filter, etc.) (empty them, don't drop them) and hopefully you're back in action.


If everything else fails, you can dump your database with

mysqldump -u yourdatabaseuser -p yourdatabasename >yourmysqldump.sql

(I presume you're using MySQL) and then replace all the occurrences of test.yourdomain.com with yourdomain.com or whatever you need by using search & replace against the dump file.

In Linux/Unix shell a straight-forward way is to use sed:

sed -i -e 's/test\.yourdomain\.com/yourdomain\.com/g' yourmysqldump.sql

Then just import the dump back to MySQL with

mysql -u yourdatabaseuser -p yourdatabasename <yourmysqldump.sql

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy