How to Install or Move Drupal in live server

Submitted by admin on Wed, 06/21/2017 - 13:24

In localhost:

Step 1: Clear cache table..(important)


Sep 2: Export database from localhost..

  • http://locahost/phpmyadmin
  • Select the database & click export
  • Given the name to the database & save it somewhere (may be in local folder)

In Live server:

Sep 3: Login Cpanel in live server

  • Go to Mysql Database
    • Create database
    • Add user to database & click ALL PRIVILEGES
    • At the bottom - click Make Changes

                  *(Remember the database name, username & password - because we will used it to setting in setting.php)

  • Then go to Phpmyadim
    • Click the database that we have create & click import
    • When database was succefully import..check the database table, to make sure all table sucesfully import
  • Setting file on setting.php
    • Locate the file on: sites/default/settings.php
    • Change the database name, user name & password as we create on step 3
  • Transfer file from localhost to live server
    • Using FTP - transfer all folder & file to live server
  • Test..!
    • Test site on live server - make sure everything is ok and DONE 

NOTE: Pay attention to another setting as below:

1) setting.php for ['trusted_host_patterns']

**Below is setting for multi site
$settings['trusted_host_patterns'] = array(

2) setting.php for Private file

$settings['file_private_path'] = 'sites/default/files/private';

3) Change the temporary folder
then change the temporary folder like: sites/default/files/private/tmp

Note: pay attention to above: if we just put "/tmp" - it's doesn't work

4) Enable OPcache in cPanel
READ THIS:https: //

Take attention to:

  • hostname
  • mysql or mysqli or .... as you database
  • database username format, something like: username_dbname (for cpanel)
  • database password
  • Put website on development mode if we're update from existing website