Drupal/C4/Hosting-a-Drupal-website/English-timed

From Script | Spoken-Tutorial
Jump to: navigation, search
Time
Narration
00:01 Welcome to the spoken tutorial on Hosting a Drupal website.
00:06 In this tutorial, we will learn to- Get our code and database ready for our website
00:13 Host our Drupal website and Upload our local content on this website
00:20 To record this tutorial, I am using Ubuntu Linux 16.04 and Firefox web browser
00:28 You can use any browser of your choice.
00:32 To practise this tutorial, you will need A working Internet connection
00:37 A web hosting control panel such as cPanel and A domain name
00:43 You should also have basic knowledge of Drupal.
00:47 If not, for relevant Drupal tutorials, please visit the link shown.
00:53 First let us learn about Drupal web hosting services.
00:57 There are many web hosting services available such as Godaddy, Bigrock and HostCats.
01:06 These service providers are cPanel based with an auto installer script.
01:12 One has to pay to buy some space from these providers.
01:17 To host a website, you will need the code and database of your local Drupal website.
01:24 Let’s open our local Drupal website which we are going to host.
01:29 We will clear the cache first. To do that, click on the Configuration menu.
01:35 Under Development, click on the Performance option.
01:40 Here, remove the checkmarks from Aggregate CSS files and Aggregate JavaScript files options.
01:48 Click on the Save configuration button.
01:52 Now click on the Clear all caches button. You can see that the caches are cleared.
02:00 Now we will keep our code ready. To do that, open the File browser.
02:06 Go to the folder where we have installed Drupal locally.
02:11 Now go to apps -> drupal -> htdocs folder.
02:16 Inside this htdocs folder, we have the code of our local website. Let us compress or zip this folder.
02:25 I will save this in the Downloads folder on my machine.
02:30 Now our code is ready.
02:32 Next we will get our database ready. Let us open the phpMyAdmin of our local website.
02:41 Click on the database named bitnami_drupal8.
02:46 Click on Export button in the top panel.
02:50 Then choose the Export method as Custom.
02:54 Under the section Object creation options, put a checkmark on Add DROP TABLE option.
03:01 Scroll down and click on Go button at the bottom.
03:06 Click on OK button to save the file.
03:09 Open the default Downloads folder and see the exported sql file and the htdocs zip file.
03:18 Next let us learn to set up a cPanel. To do this, click on the Set Up button.
03:25 Here we have to choose our domain name. I have already bought a domain named codingfordrupal.info.
03:33 You have to use your own domain name here.
03:37 Details of how to purchase a domain are given in the “Additional Material” link of this tutorial.
03:43 Click on Next button.
03:46 Here we have to choose a data center. I will click on Asia and click on Next button.
03:53 In cPanel username, we have to give our username.
03:58 For the password, I will simply click on the Generate a password button.
04:03 You can type any username and password as per your choice.
04:07 Note down the login details for future use.
04:11 Then click on the Next button.
04:14 After this, it asks us whether we want wordpress to build our website.
04:20 We are going to host a Drupal website.
04:23 So click on No, not now button, then click on the Finish button.
04:28 It could take several minutes to complete the setup.
04:32 Once the setup is done, we will see a window like this.

Here, click on the Manage button.

04:40 Our cPanel main window has opened now. We can see our Website Name, IP Address, etc.
04:48 Please have a look at this page and explore the options thoroughly.
04:53 Next we have to create a database in the cPanel.
04:57 Open the File browser and go to the folder where we have installed Bitnami Drupal Stack.
05:04 Now go to apps -> drupal -> htdocs -> sites -> default -> settings.php
05:13 The settings.php file will be open in an editor.
05:18 Scroll down to the end of the file. Here you can see the database details.
05:24 You have to use these details to create a database in the cPanel.
05:30 Switch to cPanel main window.
05:33 Under Databases, click on MySQL Database Wizard.
05:37 Now copy the database name from settings.php file.
05:42 And paste it as the database name in the MySQL Database Wizard.
05:47 Click on Next Step button.
05:50 Copy and paste the username and password.
05:55 Click on Create User button.
05:57 Put a checkmark on the ALL PRIVILEGES option.
06:01 Click on Next Step button.
06:04 Click on Return to MySQL Databases.
06:08 Here we can see the database and the user which we created.
06:13 Next let us learn to install Drupal in the cPanel. Click on the Home button in the top panel.
06:21 Under Web Applications, click on Drupal.
06:24 On the right side, click on install this application button.
06:29 Under Location, you can see the domain name.
06:33 Under Version, choose the version which you have installed in your local machine.

I will choose 8.2.6.

06:41 Under Settings, we have to give our preferred username and password for the administrator.
06:48 Note down the login details for future use.
06:52 In the Advanced section, we can set up the database, email and backup.
06:58 I will choose Let me manage these settings.
07:02 In Database Management, choose Let me choose an existing database.
07:07 In the Database Name, choose the database which we created earlier.
07:12 In the Database Username and Password, give the details from the settings.php file.
07:19 In Table Prefix, keep the field empty.
07:23 Now click on Install button.
07:26 Once the installation is done, we can see our website name here. Click on it.
07:33 Our website is successfully hosted.
07:36 But we have to update it with our local content. So let us learn to upload our local content on this website.
07:45 Switch to the cPanel main window and click on the Home button in the top panel.
07:51 We will open the File Manager of the cPanel.
07:55 Make sure that the Web Root option is selected. Click on the Go button.
08:01 Now we are in the public_html folder. Click on the Upload button in the top panel.
08:09 Click on the Browse button and select the htdocs.zip file from the Downloads folder.

The file is now uploaded successfully.

08:19 If you have a file that is bigger in size, please use Filezilla or any SSH client for uploading.
08:27 Now close this window.
08:29 In the File Manager window, go to htdocs.zip file and click on it.
08:36 Now to extract this file, click on the Extract button in the top panel.
08:41 In the popup window that appears, click on Extract File button.
08:47 Once the file is extracted, double-click on the htdocs folder.
08:52 Now go to the Sites folder.
08:55 Here we will change the permission of the default folder.
08:59 To do that, click on the Permissions column and change it to 755.

This will give write permission to the user.

09:08 Then go to the default folder and change the permissions of the settings.php file.
09:16 Once again, click on the Permissions column and change it to 600.
09:22 This will give write permission to user so that we can edit the settings.php file.
09:29 To open the settings.php file, click on the Code Editor button in the top panel.
09:35 Click on the Edit button.
09:37 Scroll down to the end of the file. Here we can see the database details.
09:43 Remove the unix_socket line.
09:46 Now click on the Save Changes button in the top panel.
09:50 Click on the Up One Level button in the top panel.
09:54 Once again, click on the Up One Level button. Now we have to move this content to the public_html folder.
10:04 To select the files and folders, click on the Select All button.
10:09 Click on the Move button in the top panel.
10:12 In the file path, remove htdocs.
10:16 Click on the Move Files button.
10:18 In the side panel, click on the folder public_html.
10:24 Now the folder public_html has been replaced with the code of our local website.
10:32 Next we have to import our local database to our live website. To do that, switch to the cPanel main window.
10:41 Under Databases, click on phpMyAdmin.
10:45 In the side panel, click on the database which we created earlier.
10:50 Click on the Import button in the top panel.
10:54 Then click on the Browse button.
10:56 Now choose the sql file which we exported from our local Drupal.
11:02 Lastly, click on the Go button. You can see that the sql file has been imported successfully.
11:10 Now open a new tab in the browser and type your domain name in the address bar.

Our Drupal website is hosted successfully.

11:20 With this, we come to the end of this tutorial.
11:24 Let us summarize. In this tutorial, we have learnt to-

Get our code and database ready for our website, Host our Drupal website and Upload our local content on this website

11:38 The video at the following link summarises the Spoken Tutorial project. Please download and watch it.
11:46 The Spoken Tutorial Project Team conducts workshops and gives certificates to those who pass online tests. For more details, please write to us.
11:57 Spoken Tutorial Project is funded by NMEICT, Ministry of Human Resource Development and

NVLI, Ministry of Culture, Government of India.

12:09 This is Priya from IIT Bombay. Thanks for joining.

Contributors and Content Editors

PoojaMoolya