[Practical P-2] How to Migrate a Drupal 7 Website to a New Server with Cpanel (with Screenshots) - PART B

Submitted by Rajasekhar on Sat, 11/17/2018 - 19:21

Please follow steps after done with PART A:

  1. Upload the source file zip to the folder in the new server.
  • Go to FILES section, click on File Manager and select Web Root (public_html/www) directory to place the file and click on Go.

  • Now you can able to see your File Manager Webroot directory and the files.

  • Now go inside your domain name folder and click on Upload option available on the top bar. Browse the file and you will see upload rate down to the right corner.

  1. Unzip the file and navigate to sites folder.
  • Now select zip file and click on Extract option available on the top bar. After Extraction completed, delete the source zip file.

  • 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'.

  1. Edit the file settings.php and change the database configuration to point to the new database.
  • Navigate to sites/default/settings.php. Open the file any editor on cPanel. Then change database configuration.
  • $databases = array (
      'default' => 
      array (
        'default' => 
        array (
          'database' => 'TempDatabase',
          'username' => 'TempUsername',
          'password' => 'TempPassword',
          'host' => 'localhost',
          'port' => '',
          'driver' => 'mysql',
          'prefix' => '',
        ),
      ),
    );
  1. Also ensure that .htaccess is present in the source folder. If not, upload the same from the downloaded Drupal source folder from drupal.org.

  1. Hit the subdomain URL in the browser and check whether the site is loading properly or not.
  2. Also, log in to the website and make sure that even login is working. 
  3. 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.