Moving a Drupal Site From One Host to Another
Table of contents
No headers
- The first thing that you'll want to do is backup your website and database. To backup the website, use an FTP client, such as FileZilla, and for the database, you'll want to either use the control panel that your current host has provided or through phpMyAdmin.
- Then you'll want to upload your backed up website to your new host. Make sure to keep the directory paths the same, so if your Drupal installation on your current host is in a subdirectory, you'll want to make sure that same directory structure exists on your new host.
- On your new host, create a new database and user and make sure that uses permissions to the new database.
- Using the tools provided by your new host, upload the backup of your database to your new database.
- Modify the file [drupalhome]/sites/default/settings.php and make sure that your database connection reflects your new hosting environment.
- Check your .htaccess file and make sure that it is also correct.
- Upload a helloworld.html file to your root web directory on your new host. This will be your test file to see if the webpage you are seeing is from the new host or the old. Once the DNS is updated in setp 8, you'll go to your website/helloworld.html and if you see that page, you'll know the DNS is serving it from the right server.
- Once you've confirmed that the site is configured on the new host, update your DNS and wait for the TTL's to expire (or if you are using OpenDNS on your network, you can go to the CacheCheck and force it to go to the authoritative DNS for that domain and look at the new A records). You may need to do the below on your local PC to force the new IP for the domain you are looking up. Also its worth clearing your browser cache.
-
ipconfig /flushdns