Steps to migrate the website are:
-
Create a backup of the website from the existing server
-
Create a zip file of the source folder
-
Note: You may have to check with the person/team that handles the older server.
-
-
Take a database backup of the website using backup & migrate module of Drupal.
-
Note: If you do not have permissions, you may ask a person/team that handles the old website.
-
-
-
Log in to the new hosting server.
-
Add the domain as an Addon domain . Give an appropriate name for the folder while adding addon domain. There will also be a subdomain created for the addon domain.
-
Create a new database and a new user in Cpanel. Assign the user to the newly created database and grant all the privileges
-
Go to phpMyAdmin in Cpanel and navigate to the newly created database and import the backup of the database of the website to the same
-
Upload the source file zip to the folder in the new server.
-
Unzip the file and navigate to sites folder.
-
check whether write permission is enabled for the 'default' folder or not.
-
If not, enable the same and enable the write permissions for the file 'settings.php'.
-
-
Edit the file settings.php and change the database configuration to point to the new database.
-
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'TempDatabase',
'username' => 'TempUsername',
'password' => 'TempPassword',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
),
),
);
-
-
Also ensure that .htaccess is present in the source folder. If not, upload the same from the downloaded drupal source folder from drupal.org.
-
Hit the subdomain URL in the browser and check whether the site is loading properly or not.
-
Also, log in to the website and make sure that even login is working.
-
Change the nameservers of the domain to point to the new server.
-
Note: You may have to contact the person/team that handles Domain Name System for your company.
-