Closed (fixed)
Project:
Drupal core
Version:
6.9
Component:
mysql database
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Jan 2009 at 04:58 UTC
Updated:
4 Jul 2010 at 10:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
ainigma32 commentedI think you should be OK without changing the shared_ tables. Just remember to change the prefix in settings.php too.
Please post back how the rename works out for you.
- Arie
Comment #2
bsherwood commentedI noticed in the 'shared_sequences' table that some fields had the old prefixes. So I updated them to the new table prefix as well.
The transition went fairly smooth:
1. Backed up ALL files, databases, etc...
2. Moved site (Drupal files) over to new domain.
3. Changed table prefixes on database
4. Updated settings.php. Changed database hostname and updated database array variable in settings.php to use new table prefixes).
5. Accessed site at new domain. Voila! It worked.
In fact, my only real issue came up when I tried to redirect my old domain to the new domain.
All URL's (Pathauto) would remain the same, I just needed a "MOVED PERMANENTLY" HTTP code to redirect everything over. My domains are registered at godaddy.com and I host at Dreamhost. I moved the nameserver info back to godaddy and forwarded the site over but it didn't work.
I then sent the nameserver settings back over to Dreamhost and configured the site to redirect from their panel. It worked.
I plan on just keeping it that way for a few months so that the search engines "see" it and update my pages. Maybe when I am bored I will try sending it back over to godaddy.com and redirect from there, but in the meantime, everything is working fine.
Comment #4
not_Dries_Buytaert commentedThe procedure described by 'bsherwood' worked for me:
Ad 1) I exported the database using version 6.x-1.2 of the "Backup and Migrate" module (http://drupal.org/project/backup_migrate), but I guess any backup/ export tool will do.
Ad 3) I replaced the old with the new table name within the backup file using a text editor (such as http://notepad-plus.sourceforge.net).
A more user-friendly solution with a GUI is proposed here: http://drupal.org/node/196936
I suspect the redirection issue described by 'bsherwood' is off-topic: certain configuration settings (stored in the database file) could still contain some old domainname related settings, such as for the locations of multisite files ("sites/{domainname}/files/") and themes ("sites/{domainname}/themes/"). If not, the cause of the issue has likely to do with the configuration of the hosting and/ or domainname (server).
Comment #5
akaserer commentedhi
i found this script to change table prefixes.
seems like the prefix filter does not work.
does anybody know why?