Drupal Interview Questions

Drupal Interview Questions

A list of top frequently asked Drupal interview questions and answers are given below.

1) Explain Drupal.

Drupal is free, open-source content management framework written in PHP. Drupal is distributed under GNU General Public License.

Drupal is a framework which organize, manage and publish content easily and provides a lot of features of customization.


2) What are some most commonly used PHP based CMS?

Following are some most commonly used PHP based CMS:

  • Drupal
  • Joomla
  • WordPress
  • TYPO3

3) Why Drupal is so popular and called a powerful framework?

Drupal is very easy to learn and handle. A user with nil programming skill can also handle the content management and customization of a Drupal's website. That's why Drupal is getting popular day by day.


4) What are system requirements for Drupal installation?

System requirements for Drupal 8:

  • Web server: Apache, Nginx, or Microsoft IIS
  • Database: MySQL 5.5.3/MariaDB 5.5.20/Percona Server 5.5.8 or higher with PDO and an InnoDB-compatible primary storage engine, PostgreSQL 9.1.2 or higher with PDO, SQLite 3.6.8 or higher
  • PHP 5.5.9 or higher
  • PHP Memory: 60 MB

5) Explain Drupal's features.

Drupal has a lot of features:

  • Simple and secure theme
  • Mobile first
  • Provides multilingual features
  • Easy configuration
  • Easy writing
  • Quick edits
  • Better support
  • Built-in web services
  • Fast loading speed

6) What is module in Drupal?

A module is a set of codes that extend Drupal features and functionality.

Drupal modules:

Core modules: These modules are included with the main download of Drupal, and you can turn on their functionality without installing additional software.

Contributed modules: These modules are downloaded from the Modules download section of drupal.org, and installed within your Drupal installation.

You can also create your own module "CustomModules" using PHP programming, and Drupal's module API.


7) Write down some modules that are used in Drupal?

Some of the modules recommended are:

  • Views
  • Token
  • Ctools
  • Quicktabs
  • Pathauto

8) What is a sub theme in Drupal?

Sub themes are just like other themes of Drupal but they have a little difference. Sub themes inherit the parent's theme. There are many sub themes that can be connected to their parents. A sub-theme can be a child of another sub-theme, and it can be branched and organized however you see fit. This is what gives sub-themes great potential.


9) What does PDO mean in Drupal?

PDO stands for PHP Data Object. It is a lean and consistent way to access databases. It facilitates developers to write portable codes easily. PDO is not an abstraction layer. It is more like a data access layer which uses a unified API.


10) What is DRUSH in Drupal?

DRUSH is a command line shell and UNIX scripting interface for Drupal.


11) Can Drupal run on command line?

Yes. Drupal can run on command line by using DRUSH.


12) Why is Ctools used in Drupal?

Ctools is a set of APIs and tools which is used to improve the developer experience.


13) What are the render arrays in Drupal?

Render arrays are the basic building blocks in Drupal. They provide you a structured way to programmatically change the content before it is displayed.


14) What are patches in Drupal?

Patches are the files that contain a list of differences between one set of files, and another. You can make changes like addition, deletion in codes through patches. Patches can also be used to make changes to another copy of the original or main file.


15) Is it possible to disable a core required modules through Drupal admin?

No. It is not possible to disable a core required module through Drupal admin.


16) Explain the database system in Drupal.

In Drupal database system, each type of information has its own database table. Different types of information will be stored in different database table. For example, nodes information is stored in nodes table.


17) What are the supported databases by Drupal?

Drupal supports MySQL/MariaDB, PostgreSQL, and in Drupal 7 SQLite.


18) How can you drop a table using module in Drupal?

To drop a table you can use db_drop_table in install file.


19) What is Drupal distributions and when to use it.

Distributions are full copies of Drupal including Drupal core along with additional software such as modules, libraries and installation profiles.

Distributions are used for:

  • Demoing Drupal
  • Evaluating Drupal
  • Quickly binding Site
  • Learning Drupal

20) What is Drupal weight?

The term weight in Drupal is used to order nodes. Nodes with lower weight will be at top of the list while nodes with heavier weight will be at lower position.


21) What is Drupal cron?

The term cron is a daemon that executes commands at specified interval. Drupal cron executes commands or scripts automatically at specified interval.


22) Name the translations available in Drupal?

Languages in which Drupal can be translated are:

  • Catalan
  • Dutch
  • French
  • Hungarian

23) Name the five conceptual layers in Drupal system.

  • Data (nodes, etc)
  • Modules
  • Blocks and menus
  • User permissions
  • Themes and templates

24) Explain the API in Drupal 7?

The field API allows custom data fields to be attached to Drupal entities. Any entity type can use field API to make itself "fieldable" means allows fields to attach to it.


25) What is node in Drupal?

Drupal treats all the stored content on its web site as nodes. Any piece of content like blog, article, page, etc is considered as node. Although, the comments are not stored as nodes but they are always connected to a node.


26) What is template.php in Drupal?

The template.php file in the theme directory allows you to override a theme function.


27) Why 'search' function in Drupal is better than other CMS?

Drupal integrates well with external search engines such as Xapian, Apache solr if the built-in search engine does not meet your needs properly.


28) Explain hooks in Drupal.

Hooks are Drupal API code which allows module to interact with Drupal core. Its module system is based on the hooks concept.


29) How to interact with Drupal search systems?

There are three ways to interact with Drupal search system by implementing:

  • nodeapi (update index)
  • hook_search()
  • hook_update_index()

30) How will you add custom PHP codes in Drupal pages or blocks?

Be default, Drupal doesn't allow the insertion of PHP codes in its pages. To embed PHP codes, you need to activate a Drupal module called PHP filter. By default, this module remains disabled.


31) Explain the use of Sections module in Drupal.

The Sections module allows applying different themes to different pages in a Drupal site.


32) Explain Taxonomy in Drupal.

Drupal classifies its content which is called taxonomy and is implemented in the core Taxonomy module.