This week we're going to dive into the hands-on configuration for the Working with Drupal Multisite series.
In this lesson we'll be building a simple university site, udrupal.com, with different areas, each with their own website: the main site, a news site, and an alumni site. The news site is simply a subdomain of the main domain name, news.udrupal.com, and the alumni site actually has its own separate domain name, udrupalalumni.com. To get this done, you're going to learn how to confirm the DNS is working for the domain names. That is, that they are currently pointing to the right server. Then we're going to configure an Apache vhost on our server so that Apache knows where to find our Drupal code base. We'll finish things up by installing our main Drupal site, udrupal.com.
Additional resources
If we want to do development work on the university multisite, we need to do a few things to have this run smoothly in a local development environment with all of those URLs. The sites.php file is going to let us define aliases for the site configuration folders in /sites
. In this tutorial we'll explain why local development with multisite is tricky, and how to get it set up properly.
Additional resources
example.sites.php (api.drupal.org)
With our domains and Apache configuration in place, we need to make sure all three sites can be installed at the different domains by creating our multisite directories in the sites folder. In this tutorial, we'll create the necessary Drupal site directories and settings files for the three sites so they are all running smoothly, check the domains and install the other two sites, and wrap up by changing the theme on the alumni site.
Before we get started, you should make sure you have two empty databases created for the two new sites we'll be installing.
In this tutorial we're going to be working directly on a server using the command line. You can feel free to use a GUI interface for your site, like an SFTP app or just your local machine file browser and editor apps. If you want to brush up on using the command line, you can check out our free Command Line Basics series.
Drush is a really great tool for managing your Drupal site quickly and easily. If you don't already know about Drush, you should definitely check it out. When working with a multisite installation though, Drush can get confused if you don't give it all the information it needs. In this lesson we'll walk through how to use Drush properly with a multisite installation, covering both how to manage just an individual site and how to work with all of your sites at the same time.
Creating Block Types with Bean
Blog postWhether you're a Drupal beginner or veteran module developer, one thing everyone understands about Drupal is the core block system is very limiting. There are lots of modules out there that attempt to make blocks more robust. Heck, site builders have even used Views as a complete block replacement. There is one module that makes blocks a ton more useful and that is the Bean module (Block Entities Aren't Nodes). The Bean module replaces a lot of modules we used in the past to give blocks more power and function. Drupal 8 even works just like the Bean module out of the box. Instead of using Views or making nodes blocks, Bean gives us fieldable block types.
This week, we're kicking off a new series, Working with Drupal Multisite. We're also releasing a new video in our Drush series, Installing Drush with Composer.
Before we set up a multisite we need to understand how Apache and Drupal work together to deliver the site we intend. In this lesson we'll look at the documentation for Drupal multisites, and then discuss the way you need to set up your Drupal directories. We'll also review the workflow that Apache and Drupal go through to get the correct site displaying in the browser.
Additional resources
Multi-site - Sharing the same code base (drupal.org)
Building one Drupal site is a fair amount of work in and of itself. But what about working with multiple Drupal sites? Sometimes you have a few sites that make sense together, either from a maintenance perspective, or due to an overlap in content or users. There are a number of different ways to approach this in Drupal, and which path you follow varies considerably depending on the exact use case you need to fulfill. In this lesson we'll get a good look at the problem multiple sites can pose, and list out some common use cases. Then we'll take a look at three different broad categories of solutions, with some specific architectural approaches. The rest of this series will walk through managing multiple sites using Drupal core's built-in multisite system.
If you are interested in working with the Domain Access project instead of core multisite, you should look at the Introduction to Domain Access series.
When working with domain names and getting a website to show up in your browser, it can be a little confusing to sort out which bits of the puzzle are where. You need to be able to properly configure the domain name server (DNS) so your browser can match up a domain name with a web server, and then make sure the Apache web server knows which files to direct that incoming domain name to. In this lesson we're going to walk through the process from the browser request to the website files. We'll take a look at the Apache documentation on virtual hosts (or vhosts) and discuss where to find this configuration. Then we'll take a look at some example vhost files to see what's going on in there.
Additional resources
Welcome Blake and Will
Blog postWe're excited to introduce two new team members! Meet Blake Hall and Will Hetherington.
Podcast No. 58: Drupal Console
Blog postThis week on the podcast, Amber Matz chatted with Jesus Manuel Olivas about the Drupal Console project. What is Drupal Console? The Drupal Console is, at this time, a suite of tools that you run on a command line interface (CLI) to generate boilerplate code and interact with a Drupal 8 installation.
Responding to Events in Drupal
Blog postEvents in Drupal allow various system components to interact and communicate with one another while remaining independent, or decoupled. The event system is built on the Symfony event dispatcher component, and is an implementation of the Mediator design pattern. This post takes an in-depth look at how module developers can subscribe to events in Drupal.
More Drupal 8 Insights
Blog postLast month, we posted a survey regarding your plans for learning Drupal 8. This was a follow-up to a similar survey we posted back in May, 2014. The responses we received in both instances were remarkably consistent, which is reassuring as we begin to publish our Drupal 8 tutorials. Here are a few big take-aways from our Drupal 8 surveys and some insight into our plans for Drupal 8 tutorials.
Last year was big for Drupalize.Me. We made a lot of changes to our website, and we increased the number of video tutorials we publish each week. In December 2014, our team met in Atlanta to celebrate these successes and outline a few high-level goals for 2015. The big goal to share is that we want to communicate with you more! We want to hear your suggestions for improvements, and we want to know you as individuals. We look forward to meeting and chatting with you at events like DrupalCon, but we also want to open new channels of communication. We have lots of ideas for this, and we're excited to get started.
This tutorial covers writing a "Hello World" test for Drupal 7 using the SimpleTest framework that comes with Drupal core, and is based on the free video Learning Test Case Basics by Writing A Hello World Test.
February Tech Update
Blog postIt's February, so it's time for another tech update. And it's a big one! Here's what we've been working on...
In this podcast Kyle Hofmeyer gets together with fellow Lullabots Joe Fender and Carwin Young to chat about their book, why they wrote it, and what it covers. From book writing, to favorite frameworks, take a listen to learn more about the book, Front-End Fundamentals.
Panels, Blocks, Layouts, and Drupal 8
Blog postOver the years of Drupal 8 development we've heard a lot of talk about "Panels in core" or "Blocks everywhere" or "Layout all the things!" and even SCOTCH(?). What does it all mean? Is Panels actually in core? Well, no, but there are some cool improvements in Drupal 8. I decided to follow the breadcrumb trail to figure out what this initiative was really about and how it ended up, now that Drupal 8 is in beta. Join me for a little bit of a trip back through the life of the Blocks and Layouts Everywhere (SCOTCH) Initiative.