Internet Search

Transfer drupal site: Localhost-Live Server-Localhost

In this article regarding the drupal site transfer from Localhost to Live Server or via versa. Transfer from localhost to live server need to change some setting:-

Setting the Temporary, Private and Public folder

  • Temporary directory: \tmp
  • Public file system path: sites/default/files
  • Private file system path: sites/default/files/private

In drupal 8, setting for Public & Private file using setting.php file

In drupal 7, setting for Public & Private file using System File (Configuration/Media/System File)

Settings trusted host patterns

In drupal 8 (Localhost): 

$settings['trusted_host_patterns'] = array(

In drupal 8 (Live Server):

$settings['trusted_host_patterns'] = array(
 *  '^example\.com$',

Public file base URL (Drupal 8)

: # $settings['file_public_base_url'] = '';

Base URL (optional) - (Drupal 7)

# $base_url = '';  // NO trailing slash!