Drupal

How to Add Noindex to Pages using Metatag in Drupal

Often on a website, you want to control what pages are displayed in search results. You can do this by adding the noindex meta tag to pages. I’m not going to cover why you would want some pages not to appear in the search results; however, I want to show you how to implement it in Drupal.

This tutorial will teach you how to use the Metatag module to control the noindex meta tag.

If you want to learn more about Metatag, read our tutorial “Getting Started with Metatag in Drupal”.

How to Fix “This entity cannot be referenced” Error on Paragraphs in Drupal

Recently working on a Drupal site, creating new paragraph types as you do… While creating pages and testing the paragraphs, I got the following error: This entity (paragraph: ID) cannot be referenced. This was the first time I ever saw this error.

What I discovered was I accidentally unselected the paragraph type from the “Reference type” section on the entity reference revision field.

This can happen on any entity reference field not just a paragraph field.

If you create a page and reference an entity or create a paragraph. If the content or paragraph type is unselected from the reference type section. The next time you save the form you’ll get the error.

Manage Terms in Bulk using Taxonomy Manager in Drupal

The Taxonomy Manager module provides a different user interface for the management of taxonomy terms, particularly in batch operation. Terms can be added or deleted in bulk, instead of one by one. In addition, it provides features to export all taxonomy terms and search. This terms-export feature is beneficial for transferring the terms in bulk from one site to another.

In this tutorial, you’ll learn how to install and use the Taxonomy Manager module.

Add Widgets to Sidebar using Field Group in Drupal

The Field Group module allows you to organize field widgets and formatters. You can group them into tabs, fieldsets and so on. It’s a great way to organize your content form, especially if you have a lot of widgets.

Want to learn more about Field Group: How to Customize Content Forms and Pages Using Field Group in Drupal

This tutorial will teach you how to add field widgets to the right sidebar on the content edit form.

If you create an article, you’ll notice that custom field widgets appear on the left. But on the right-hand side, you can control things such as menus, comments, URL alias and more.

We’ll use Field Group to add Tags and Image field on the Article content type into its own section on the right-hand side.

Customize Entity Reference Autocomplete Results using Views in Drupal

An entity reference field allows you to create relationships between other entities such as pages and articles. The field comes with an autocomplete widget that will enable you to search and select other entities.

When you search for items to reference, just the titles are returned and in most cases, this is enough. But when you have lots of content with similar titles using the autocomplete widget becomes problematic because it’ll return similar results.

We can customize what is returned in the autocomplete widget using the Views module. No extra modules are required.

In this tutorial, you’ll learn how to use Views to change the autocomplete results.

Add Preview Page to Forms using Webform in Drupal

When you create a form using the Webform module, you may need a “preview” step. This is a page or step which allows the user who’s submitting the form to preview what’s being submitted.

If they see a mistake, they can go back to the form and fix the error. Once the form has been filled out and previewed then, it can be submitted.

Webform allows you to quickly create a preview step in any form, and in this tutorial, you’ll learn how to implement it.

How to Manage Comments in Drupal

Drupal ships with flexible commenting functionality out of the box. Although there is a bit of a learning curve (as with many things in Drupal), once you understand the core concepts and how to manipulate the different features, you will be exposed to the power of managing comments within Drupal.

This tutorial will teach you how to manage comments in Drupal. We’ll cover the following:

  • Add comments within Drupal
  • Allow anonymous users to comment in Drupal
  • Moderate comments in Drupal
  • Create your custom comment type in Drupal

Backup Drupal Sites using Backup and Migrate Module

Backup is an essential aspect for every site but often overlooked. Backup seems time-consuming and unnecessary, but when things happen, it can be a life saver freeing you from unexpected damage. It is a question of how backups can be made quickly, preferably automatically, without taking too much time. In addition, it is also essential to make sure when backups are restored, it works reliably as expected without surprises.

In this tutorial, we introduce a module that helps to provide such a solution.

The Backup and Migrate module can backup the database and files of a Drupal site. The module also provides a restore operation of the backups when needed. It can be easily installed in a Drupal site, and it is free. With this module, the authorized user can perform backup manually or automatically. Backups can flexibly include only the database or user files, or both.

When operated manually, backups can be downloaded immediately in compressed file format, or stored in a safe location in the server. When automatic operation is preferred, it can be scheduled, and the backed up files in compressed format will be stored in the server. The site can be taken offline with a notification message during the backup procedure, and return to normal after it’s completed.

Remember you should never rely entirely on a single backup solution. Things can still go wrong. The backup and restoration process may fail for many different reasons. It’s good to have a second backup system, such as at the server hosting level.

How to Host and Deploy Drupal Sites using Cloudways

Cloudways is a managed cloud hosting provider which allows you to host and deploy Drupal sites on popular cloud platforms. They don’t host your site, instead you choose a cloud provider, i.e., DigitalOcean, Linode, AWS and so on.

The benefit of using Cloudways is that you can start on a cheap server and upgrade as needed. You get the same features if you spend $20 or $100 per month. As your site gets more traffic you can scale up to a faster server.

The server provisioning and application management is all done via the Cloudways platform. For example, if you use DigitalOcean, you won’t have to create a separate account to manage the server. You can do everything via Cloudways platform.

The servers come configured with PHP, Apache, MariaDB, Varnish, Redis (uninstalled by default) and so on.

Once provisioned you’ll be able to host an unlimited number of Drupal sites on a single server. You’ll need to make sure your server has enough resources, i.e., RAM and CPU.

Other hosting platforms charge per site and traffic. Cloudways only charger per server and you can install as many websites as the server and bandwidth can handle.

In this tutorial, you’ll learn how to install and deploy a Drupal site on Cloudways.

We’ll cover how to install and run Drupal in two ways:

  • How to manually install Drupal via SSH
  • How to Deploy Drupal using GitHub

Cloudways doesn’t have a one-click install for Drupal. You will need to be comfortable with Composer and using SSH to get into a server. If you want to deploy your Drupal site via Git then you’ll need to be comfortable using GitHub.