By pixelpyro on
Hi Guys,
I have installed a copy of Drupal onto a clients server, added the required modules and the client has gone ahead and added their content to the site. All is working perfectly (of course), however, the client has now decided that they wish to change host and so the question I have is:
Am I able to simply move everything that has been installed (along with a copy of the DataBase) onto the new server and change a "config" file somewhere in order that Drupal will work and all the content is still in place OR do I need to reinstall everything again. Or to put it another way is there a way to Re-deploy Drupal to a different host with minimum effort.
Many thanks,
PP
Comments
The steps ... one method ...
As long as the new server is the same framework (Linux, Apache, MySQL, PHP) then you should be able to:
1) Export your MySQL db (from current db) and import that data into a new db on the new server
2) FTP all of your current Drupal site files (the entire Drupal directory) to the new server
3) Edit your settings.php file to reference the new db URL (new db user/pass). The settings.php is in your /sites/default folder
4) Make sure to copy over the same .htaccess file you're using in your Drupal root on the current server. You'll need that. You probably won't have to change anything in it but you should copy it over
5) Once you make the changes to settings.php, you should be able to load the site on the new server without issue
Some suggestions - make sure to BACK UP your db and site files before you do this move. Always have a backup.
That should work. This is of course if the server platform is relatively similar and is Linux-based.
-backdrifting
Hi backdrifting Thanks for
Hi backdrifting
Thanks for the speedy response - I'd heard it was a great Forum, proves that.
That all sounds great as the setup of the server will have to be the same as existing for other services that are being hosted currently will need to be moved. Ultimately the move is based on cost savings so am please that this is all possible and saves me a bit of a headache.
Many thanks,
PP
couldnt find a $user , $dbpass variable, or anything similar
In the settings.php file. I found a where to set the db name. I must be thick. 6.9
=-=
yes you can move drupal easily.
here's what I do.
put site in offline mode
turn off clean urls @ administer -> clean urls
I manually empty all cache tables in the database
I manually empty the sessions table in the datbase and the watchdog table
I export my DB
I import it onto the new server
I transfer all files and folder from old server to new server
I open settings.php
I edit $db_url to point to new DB location with DB user and DB password
I replace the old settings.php with the new one in sites/default/
I log into the site on the new server
I turn clean urls back on
I set the site back online
I test the site for functionality
Hi VeryMisunderstood, Again
Hi VeryMisunderstood,
Again thanks.
Looks like I am onto a winner either way.
Cheers.
Yes, absolutely ...
Yes, VeryMisunderstood is absolutely correct and adds some good info there. It's a good idea to put your site in offline mode and also to disable clean URLs while you're migrating. You can then enabled them again on the new server. This creates less room for error.
Thanks,
=backdrifting
Module for database migration
Also, for the database steps, a module that can make them easier is Backup and Migrate. From the project page: "Backup and Migrate simplifies the task of backing up and restoring your Drupal database or migrating data from one Drupal site to another."
HELP SETTING UP DRUPAL + MAMP
Hi everyone,
I'm in Los Angeles and I'm looking for some help creating a database and granting privileges, I'll compensate you for your time, please call me at xxx.xxx.xxxx.
Thanks,
Rosivaldo
Edited by WorldFallz: removed telephone number.