How to transfer your Drupal website from one server to another

There are many different ways to recreate your Drupal website on another server. Some people use phpMyAdmin tool to create a database dump for the original site and import it into a new database on the target server. However, I have found that this method doesn’t work very well. Many times the database import does not complete because the operation times out. The cache tables are too large and the operation times out before it can be completed.
 
The best way to transfer your Drupal site from one server to another is to use the Backup and Migrate module. Use the default settings and the cache tables will not be saved in your backup. You don't need them anyways.
 
1. Make a complete backup of all your Drupal website files
2. Use Backup Migrate module to make a backup of the site database. Use the default settings. Choose Gzip and download to your desktop computer.
3. Copy all Drupal files to root directory
4. Use phpMyAdmin to create a new database, user and password. Write down the details.
5. Run yoursitename.com/install.php
6. Fix any error messages and permission issues. Register Globals needs to be disabled.
7. Enter database name, user and password for database you created in step 4.
8. Go to Site Building > Modules in your Admin Menu and look for Other category. Enable Backup Migrate module. Click Save Configuration.
9. Go to Content Mangement in your Admin Menu and choose Backup & Migrate
10. Choose Restore database and choose the gzipped database file you made in Step 2.
This will restore all your database settings and content from the original Drupal website
11. Check the settings for Site Configuration > File System. Many servers have different paths for the /files  and /tmp folders
12. Test your website to see that all pages are functioning properly.
13. Check Reports > Status Report. If you are transferring your Drupal website from a Microsoft server to a Linux server or vice versa, you will most likely need to run update.php to make sure your database structure is correct. Even if you are transferring from one Linux server to another, you will probably need to run update.php. Be sure to put the site off-line first.  Go to Site Configuration > Site Maintenance and choose site off-line.
 
I hope you find this article helpful. Please leave your comments below. I look forward to hearing from you. :-)

Comments

Website Transfer from Source Server to Target Server

Thanks for the steps. It helped Menu structure in but the website was not displayed. I removed the .htaaccess file and the website got displayed but with all source server links How do i manage ?? Please advise

Get quick web hosting assiatnce online

For me, www.WebHostingGeeks.com provided the best web hosting solutions, under my budget. It makes me feel totally relaxed now.

keren

This article is very informative and unique. I have been looking for this information for many days. I admire your work. Thanks for sharing. http://www.fenuz.com/pusat-grosir-baju-fashion-pakaian-busana-murah.php

Delete settings.php before http://yoursite/install.php

so that default.settings.php will be used

Thank you for your input

Yes, you need to delete the settings.php file. Then copy default.settings.php to settings.php.

If you have used a prefix for your MySQL tables

If you have used a prefix for your database definition in the sits/default/settings.php file for your old site, you must create your new database with the same prefix. Otherwise, the restore in step 10 above will work, but create tables in your new database that start with the old prefix. If you have already done the import, this can be fixed by setting or changing the prefix in the database definition. Note the Drupal account passwords will be those of your old Drupal site since that's one of the tables restored. For Drupal 7, the entry I am referring to looks like: $databases = array ( 'default' => array ( 'default' => array ( 'database' => 'drupal', 'username' => 'admin', 'password' => 'IAm1Admin@Large', 'host' => 'localhost', 'port' => '', 'driver' => 'mysql', 'prefix' => 'drup_', ), ), );

Migrate to Windows Server .htaccess problem

Hi, I've migrated a D7 site from a LAMP to a WAMP server. Now Drupal is adding a .htaccess file to the files -directory (sites/[sitename]/files) This causes the WAMP server to act strange. It stops loading css files. What to do?

web design

I am definitely bookmarking this page and sharing it with my friends. Very outstanding web. The content here is truly important. I will share it with my friends.

There are numerous diverse

There are numerous diverse approaches to reproduce your Drupal site on an alternate server. Some individuals use phpmyadmin device to make a database dump for the first site and import it into another database on the target server. Be that as it may, I have discovered that this system doesn't work exceptionally well. Ordinarily the database import does not finish on the grounds that the operation times out.

Transfer first or update first?

Hi, I'm on Drupal 6 and want to switch hosts. Should I transfer first and then update to Drupal 7, (or wait for 8?), or should I update first and then transfer?

Transfer your existing site for free and then update to Drupal 7

Hello, I recommend that you transfer your existing site over to your new website host. Many hosting companies will do this for you, free of charge. After you have transferred over your website as is, then you can work on updating to Drupal 7. Drupal 8 will not be ready for production use for about 6 to 8 months, so updating to Drupal 7 is a good choice.

Great easy reference....however

I can see the details in the tables through PHPmyadmin, however the site doesn't reflect any content. I then came across this article and tried that. I cant get the local data from a export database into restore on the live site. What am I missing? I really would appreciate input. I live on ground floor but would consider jumping out if I was higher up!

Many Thanks!

This walkthrough has pretty much saved my hiney. It was the best I could find online, and incredibly straightforward. A great many thanks to you, Katy!

Thank you!

Really the best instructions I have found - and I have been reading/viewing for about 4 hours. It makes such a difference when people can set things out clearly in a step-by-step fashion. THANK YOU! Much appreciated. A.

That was a really nice and

That was a really nice and informative article on transferring your Drupal website from one server to another. You can use phpMyAdmin tool to create a database dump for the original site and import it into a new database on the target server. http://www.omnitechsupport.com

Thank you

Very well written and super helpful. Thank you for sharing your knowledge.

I follow this short guide :

you will most likely need to run

you will most likely need to run update.php to make sure your database structure is correct. Even if you are transferring from one Linux server to another, you will probably need to run update.php. Be sure to put the site off-line first.

PHP Memory Limit

Thanks for the post! It was brief and to the point. When i ran the restore process i was receiving a fatal error: Fatal error: Allowed memory size of 33554432 bytes exhausted ... We tested the migration on a local server and it worked fine but when we moved it to the shared hosting environment it would fail. The cause was the php memory_limit setting. After some testing i discovered that i needed at least 64 MB for the restore to work. Once i got the memory_limit increased on the shared hosting environment it worked fine. Something to consider before migrating to a shared host in case they won't increase the limit. - Troy