Build it with Drupal 8

Similar documents
Installing Drupal on Your Local Computer

Building Website with Drupal 7

Content Management Software Drupal : Open Source Software to create library website

MOODLE Installation on Windows Platform

Document Freedom Workshop DFW 2012: CMS, Moodle and Web Publishing

Backup and Restore MySQL Databases

1 Classified Script. User Guide v1.0

Building Your First Drupal 8 Company Site

MySQL Quick Start Guide

Write a Web Application for Free Edition 2

Content Management System

Build a Multilingual Website with Joomla! 2.5

Livezilla How to Install on Shared Hosting By: Jon Manning

Site Store Pro. INSTALLATION GUIDE WPCartPro Wordpress Plugin Version

Using your Drupal Website Book 1 - Drupal Basics

Open Source Content Management System JOOMLA

EZcast Installation guide

FireBLAST Marketing Solution v2

Content Manager User Guide Information Technology Web Services

What is Drupal, exactly?

Building Library Website using Drupal

Getting Started with Dynamic Web Sites

Google Docs A Tutorial

DocuShare User Guide

Installation Guidelines (MySQL database & Archivists Toolkit client)

Create e-commerce website Opencart. Prepared by : Reth Chantharoth Facebook : rtharoth@yahoo.

Thank you for deciding to read this book. I have written this book for you to learn Joomla! 1.5 as fast as possible.

MySQL quick start guide

How To Change Your Site On Drupal Cloud On A Pcode On A Microsoft Powerstone On A Macbook Or Ipad (For Free) On A Freebie (For A Free Download) On An Ipad Or Ipa (For

Your complete guide to installing the Self-Service Portal and estore.

WebSpy Vantage Ultimate 2.2 Web Module Administrators Guide

LEARNING DRUPAL. Instructor : Joshua Owusu-Ansah Company : e4solutions Com. Ltd.

Content Management System User Guide

Site Audit ( /site_audit) Generated on Fri, 22 Aug :14:

Setting Up a Dreamweaver Site Definition for OIT s Web Hosting Server

MySQL Quick Start Guide

Building Your First Drupal 8 Site

AJ Matrix V5. Installation Manual

CEFNS Web Hosting a Guide for CS212

Bring your intranet to the IBM i With Drupal and Zend Server

All the materials and/or graphics included in the IceThemetheme folders MUST be used ONLY with It TheCityTheme from IceTheme.com.

Microsoft Windows SharePoint

SIMIAN systems. Setting up a Sitellite development environment on Windows. Sitellite Content Management System

Rensselaer Union Club Webhosting CPanel Guide

DRUPAL: DEVELOPING LIBRARY PORTAL USING OPEN SOURCE CONTENT MANAGEMENT SYSTEM

Installation Instructions

TIMETABLE ADMINISTRATOR S MANUAL

Welcome to Collage (Draft v0.1)

ClickCartPro Software Installation README

Cloudwords Drupal Module. Quick Start Guide

EBOX Digital Content Management System (CMS) User Guide For Site Owners & Administrators

GETTING STARTED WITH DRUPAL. by Stephen Cross

IIS, FTP Server and Windows

Using Internet or Windows Explorer to Upload Your Site

Kollaborate Server Installation Guide!! 1. Kollaborate Server! Installation Guide!

Lucid Key Server v2 Installation Documentation.

User Guide. Making EasyBlog Your Perfect Blogging Tool

Beginning Web Development with Node.js

HOW TO SILENTLY INSTALL CLOUD LINK REMOTELY WITHOUT SUPERVISION

Microsoft Expression Web

Reseller Manual. version 2.0-r1

Utilities ComCash

Setting up a local working copy with SVN, MAMP and rsync. Agentic

shweclassifieds v 3.3 Php Classifieds Script (Joomla Extension) User Manual (Revision 2.0)

Dashboard Builder TM for Microsoft Access

What is WS_FTP Server Web Transfer Module?...1 System Requirements...2. What is WS_FTP Server Web Transfer Module?

MassTransit 6.0 Enterprise Web Configuration for Macintosh OS 10.5 Server

owncloud Configuration and Usage Guide

How To Configure CU*BASE Encryption

TAO Installation Guide v0.1. September 2012

HowTo. Planning table online

MAMP 3 User Guide! March 2014 (c) appsolute GmbH!

EMC Documentum Webtop

UW- Madison Department of Chemistry Intro to Drupal for Chemistry Site Editors

Extending Remote Desktop for Large Installations. Distributed Package Installs

OxyClassifieds Installation Handbook

FileMaker Server 9. Custom Web Publishing with PHP

This installation guide will help you install your chosen IceTheme Template with the Cloner Installer package.

1. Product Information

An Introduction To The Web File Manager

Workshop on Using Open Source Content Management System Drupal to build Library Websites Hasina Afroz Auninda Rumy Saleque

We begin with a number of definitions, and follow through to the conclusion of the installation.

Content Management Systems: Drupal Vs Jahia

ProjectPier v Getting Started Guide

Alfresco Online Collaboration Tool

Installing OptiRain Open on Macintosh OS X 10.6 (Snow Leopard)

Building Your First Drupal Community Site

Elgg 1.8 Social Networking

How to Install and Setting Up Drupal

Google Sites: Creating, editing, and sharing a site

Information & Communication Technologies FTP and GroupWise Archives Wilfrid Laurier University

The easy way to a nice looking website design. By a total non-designer (Me!)

INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP

Drupal 101. Introduction to Drupal. October 10, 2015 nedcamp.org

Installing buzztouch Self Hosted

Getting Started with Web Hosting at TechServ

Colligo Manager 6.0. Connected Mode - User Guide

Online shopping store

Graphviz Website Installation, Administration and Maintenance

The Web Pro Miami, Inc. 615 Santander Ave, Unit C Coral Gables, FL T: info@thewebpro.com

Transcription:

Build it with Drupal 8 Comprehensive guide for building common websites in Drupal 8. No programming knowledge required! Antonio Torres This book is for sale at http://leanpub.com/drupal-8-book This version was published on 2015-01-07 This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do. 2013-2015 Antonio Torres

Tweet This Book! Please help Antonio Torres by spreading the word about this book on Twitter! The suggested hashtag for this book is #drupal8book. Find out what other people are saying about the book by clicking on this link to search for this hashtag on Twitter: https://twitter.com/search?q=#drupal8book

Contents Installing Drupal 8........................................ 1 Minimum Requirements.................................... 1 Downloading Drupal...................................... 1 Setting up a Database...................................... 1 Creating a settings.php file................................... 3 Running The Installation Script................................ 3 Understanding Drupal...................................... 4 Content Types.......................................... 4 Views.............................................. 4 Users............................................... 5 Themes............................................. 5 Modules............................................. 5 Taxonomy............................................ 5 Regions & Blocks........................................ 5 Paths............................................... 6 Menus.............................................. 6

Installing Drupal 8 Before we start can start working, we need a working Drupal 8 instance. You may skip this if you re already familiar with the process of setting up a Drupal site. You can use a local installation using MAMP (Mac OS X) or XAMPP (Windows). You can get hosting for a few dollars a month if you prefer. For additional information on this visit the Installation Guide on Drupal.org¹. Minimum Requirements The very first thing you need to get Drupal 8 running is the right environment. This includes the software that Drupal needs in order to operate correctly. Drupal 8 has different requirements from 6 and 7, so it is important to be familiar with them in order to minimize problems. The minimum requirements for Drupal 8 are: Web Server Running Apache, Nginx, or Microsoft IIS PHP 5.3.10 or higher MySQL 5.0.15 or higher with PDO, PostgreSQL 8.3 or higher with PDO, SQLite 3.3.7 or higher Downloading Drupal To download Drupal go to the Drupal project page² and download the latest stable version of Drupal 8. You can use your favorite download utility for that. If you are logged in to your server you can use wget or curl, and extract the file onto your website s folder, which is generally /var/www on most Apache servers, for example. You can also download through the browser, then upload it to your server using an FTP/SFTP program of your choosing. Setting up a Database Before installing, you must create a database and a database user, then assign the database user rights to use the database). Note: Drupal 8 is able to create a database itself if the user has enough privileges, so you may skip creating the database if this is the case. ¹https://drupal.org/documentation/install ²https://drupal.org/project/drupal

Installing Drupal 8 2 If you re using shared hosting, most providers will provide you with a browser based option usually called phpmyadmin. If you go into the Control Panel of your hosting account and access phpmyadmin, you ll be able to create a database and add a user to it which you can use. If you re using something like MAMP, the software GUI usually has a button that will launch phpmyadmin for you, which then allows you to create the database and user. The more advanced way of doing this is if you have root access to a server and you need to do it from the command line. Here s what the Drupal.org Install Page³ instructs us to do: For information on installing and configuring MySQL see http://dev.mysql.com/doc/refman/5.7/en/index.html In the following examples, username is an example MySQL user who will have the CREATE and GRANT privileges and databasename is the name of the new database Use the appropriate names for your system. Create a new database for your site (change the username and databasename): mysql -u username -p -e "CREATE DATABASE databasename CHARACTER SET utf8 COLLATE utf8_general_ci;" MySQL prompts for the username database password, and creates the initial database files. Log in and set the access database rights: mysql -u username -p MySQL prompts for the username database password. At the MySQL prompt, set the permissions using the following command: GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON databasename.* TO 'username'@'localhost' IDENTIFIED BY 'password'; In this case: databasename is the name of your database username is the username of your MySQL user account localhost is the host where Drupal is installed password is the password required for that username Be sure to use backticks ( ) around the database name if you used a MySQL escape character (_ or %) in your database name. For example, because the underscore character is a wildcard, drupal_test_account.* should be drupal\_test\_account.* for security. Otherwise the underscores would match any character and could accidentally give access to other similarly named databases. Note: Unless the database user/host combination for your Drupal installation has all of the privileges listed above (except possibly CREATE TEMPORARY TABLES, which is currently only used by Drupal core automated tests and some contributed modules), you will not be able to install or run Drupal. ³https://www.drupal.org/documentation/install/create-database#mysql_commands

Installing Drupal 8 3 For further information on the GRANT statement see http://dev.mysql.com/doc/refman/5.0/en/grant.html If successful, MySQL will reply with: Query OK, 0 rows affected Now exit the MYSQL prompt by typing: exit The server will answer by saying Bye And you re done, you can use your credentials on the installation page. Creating a settings.php file In your Drupal 8 files, browse to sites/default/files and copy default.settings.php and rename it to settings.php, copy default.services.yaml and rename it to services.yam, then create a files directory and give both files and the directory full read, write, and execute permissions as follows: chmod 777 settings.php chmod 777 files/ If you re using an FTP program, the way to do this might be differ, you might have to right click and find a way to modify a file s attributes. Running The Installation Script Visit the url for your Drupal 8 instance on your browser, you will be taken through the installation process where you will enter your database information and respective site information. After this is complete, your Drupal 8 website will be ready for use. Once you re done, set the permissions of settings.php and service.yaml to 644 as Drupal is done making modifications to them, so we should lock those files down.

Understanding Drupal Using Drupal is a lot like playing with Legos, it is simple enough to use without having any programming knowledge, yet powerful enough to compete with most frameworks out there. The building blocks that comprise Drupal have all been made, and tested extensively, all that is left to do is to have an idea, and put it together. I m personally very fond of this, as I don t particularly like to reinvent the wheel very often, only sometimes. Drupal operates with the understanding that most websites share many fundamental similarities. If you have a website with Static Pages, Blog Posts, Event Listings, and so on, they are permutations of the same fundamental concept, like an entry of sorts, which in Drupal is called a Node. This way it is up to you to decide how each Node Type gets entered, displayed, and processed by your users on the site. Content Types Imagine you have a paper notebook in front of you, and you re writing down journal entries, every day you enter similar information, let s say you add a date, a title, and the entry itself. Every day you would repeat this process in the blank sheet of paper. With that same notebook you can enter a list of friends that show up to play cards once a week, then record the winners and the losers. A Content Type is in some ways analogous to this sheet of paper where you use them for a given purpose. A Content type let s collect any information you want, let s say you want have a classified ad content type, you would collect a name, some information, some pictures, perhaps even a price, a location, and a phone number. It only differs from other Content Types in it s purpose. A Content Type is referred to is a method in which you can enter many different types of information into the database and interact with it in many different ways, to serve many different needs. For example, you can take your classified content type, and then you can display this content to your users by location, or by category, in a list, a table, or even Email it to them, it s that simple! This will become more clear as we move forward, just hang tight. Views A View is a listing of Content. For Example, if you have a Blog Content Type, you can create a View which displays the last 10 most recent Blogs. You can display it in a Table, a List, etc. All without writing any code. All you have to do is add a new View and walk through the configuration process. This helps your website be very dynamic, as you add new content, the features built with views will display the content in the way in which you configured. Perhaps the newest blog entries, organized by date, or maybe the one with the most comments, and so on.

Understanding Drupal 5 Users Drupal comes with user functionality bundled in, allowing you to manage users. This means that if you want to turn your small blog into a large operation, you can create many users and grant different levels of access to your writers, turning a small blog into a professional publishing platform in a few minutes. Themes A theme consists of a few files containing PHP, HTML, and CSS to render your site s overall look. You may find predesigned themes available at https://drupal.org/project/project_theme Modules A bundle of software that extends Drupal functionality. Modules that are contained within a fresh installation of Drupal are known as Core Modules and modules that are developed by a team or an individual that is released on drupal.org are known as Contributed Modules. Let s say you want to display your Classifieds in a Map, or your events in a Calendar. There are Contributed Modules on Drupal.org that make this much easier for you. Taxonomy You may want to categorize your content, whatever the category may be, the Taxonomy module can help you there. Let s say you want to add a category to your Classifieds content, you can add a list of categories (e.g. Auto, Jobs, etc). And if you need to, you can add as many levels of subcategories as you want to (e.g. Auto > Honda, Ford, Toyota, etc). Then Honda can be broken down into Models. This is very helpful when you want to allow a user to browse your content, allowing them to filter and search as they please. Drupal contains a module known as Taxonomy which gives you the power of defining your own vocabularies. Each vocabulary can contain Terms which in then can be grouped and attributed to a content type, or multiple content types. And a Content Type can have as many vocabularies attached to it as you need (e.g. Category, State, Status, etc). Regions & Blocks Your Drupal site is laid out in what is known as Regions. This includes your header, main content area, footer and sidebars (Some themes may vary.) Blocks are boxes containing data either created

Understanding Drupal 6 by a module (e.g. Recent Comments from the Comment module.) or created by you (e.g. A block of static text welcoming a user). A block may be displayed anywhere that the site s layout allows. You can access the blocks area by navigating through Administration» Structure» Block Layout, there you can browse the modules you already have as well as create new ones. Paths The part of a URL after your initial site address is known as a path. (e.g. http://yourwebsite.com/contactus) Paths may be defined by the user at the bottom of a content s edit page under URL Path Settings. Menus A Menu is a collection of links to other parts of your website, as well as other websites. By default Drupal comes equipped with a few pre-made menus, Administration, Footer, Main navigation, Tools, and User account menu. Custom menu s may also be created by clicking the + Add Menu button at the top, from here you ll be able to supply the title of the menu item as well as the Path it should be taken to upon click. You can access the menu area by navigating through Administration» Structure» Menus. Going Forward These concepts are extremely simplified and are only here to familiarize you with the most important aspects of Drupal that we will cover in this book. As we walk through the steps of creating a site, you ll quickly start connecting these ideas together.