Seed IM Migrating to Drupal
A few weeks ago we migrated our website to Drupal, so we thought why not write our first blog on that. The main reason we chose to migrate our website to Drupal is the fact that our previous website was a mere static website with very limited customisation, expansion and content management options. Drupal is an open source content management system which is built, used, and supported by an active and diverse community of people around the world. Besides providing the basic functionalities of any web content management system, there were two main reasons for choosing Drupal.
Firstly, Drupal’s ease of creating and maintaining blogs and secondly that Drupal can be integrated with Alfresco Enterprise Content Management System using apache chemistry. Drupal is available as distributions which provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually. For our site Drupal 7.19, which is the latest stable released version, was used.
As most of web content management systems, Drupal installation is pretty straight forward and consists mainly of putting the Drupal files in the right directory (usually public_html) on the web server and ensuring that it can connect to its respective database. But as good practice suggests, we had a test environment set up and migrated the Drupal content files and database to the webserver only after our build and test cycles were complete.
A very quick way to set up a test webserver locally is to use a WAMP server. The WAMP server is Apache, MySQL and PHP bundled and working together. Installing Drupal on the WAMP server is a 3-step process. Firstly we create a database using phpMyAdmin, secondly unzip the Drupal distribution (downloaded from http://drupal.org/download) in the WWW directory of the WAMP server and lastly go to our internet browser, type localhost (default port is 80 but it can be changed in httpd.conf file for Apache), look for the Drupal link (usually the name of the Drupal unzipped folder) on the index page of the WAMP server and follow the steps on the screen.
Note; We used the WAMP server because we were developing on Windows and it was fast to install and use. Alternatives such as LAMP or XAMP could have been used.
Drupal Themes and Modules
As mentioned previously, Drupal is packaged and released with a collection of pre-configured themes and modules. But since everyone’s requirements are not the same, Drupal also allows installing additional modules and themes as required. Modules and Themes can be downloaded from the Drupal website. Installing new modules or themes is straight forward. We find the appropriate module or theme, copy the ftp link and then go to Modules after being logged in Drupal as Administrator, click on Install New Module, paste the ftp link in Install from URL box and hit install. After the installation is successfully, click on enable module and that’s it.
Drupal Modules Used
Let’s have a look at some of the modules we have used;
By default Drupal comes with the CKeditor which has only the bare minimum in terms of editing options. The WYSIWYG Module allows integrating several editors fully in Drupal. A WYSIWYG profile defines which client-side editor is loaded with a particular text format, what buttons or themes are enabled for the editor, how the editor is displayed, and a few other editor-specific functions.
TinyMCE 3.5.8 Module
As mentioned previously the default CKeditor does not provide many editing options. Hence we turned to TinyMCE 3.5.8 editor which provide very handy features. For some reasons, TinyMCE could not be installed via Drupal’s Module install interface and had to be installed manually. So after downloading TinyMCE 3.5.8 zip file (http://www.tinymce.com) and extracting it, copy the tinymce folder to $DRUPAL_HOME\sites\all\libraries. This module depends on the WYSIWYG Module for it to be associated to a WYSIWYG profile and this is accomplished by going to Modules-> WYSIWYG and clicking on Configure, then allocating TinyMCE to any of the 3 WYSIWYG profiles (Filtered HTML, Full HTML, and Plain Text).
This module is packaged with Drupal 7.19 distribution but it is not enabled by default. The blog module is enabled by going to Modules, and clicking on the check box next to Blog.
Views and Views UI Modules
These two modules combined together allow us to create and display pages according to a particular content type. They are equivalent to Alfresco forms, providing the correct editing widgets for the metadata fields configured for the type. We have used these modules for our blog and customer pages.
The CTool module provides a library of helpful tools which is required by Views and Views UI Modules.
As mentioned previously, new themes can be installed and customised according to one’s requirement in Drupal. We used the Business Drupal 7 premium theme for our site. Any theme usually comes with a set of predefined regions and blocks that we can choose to show on a page. Drupal does allow creating new blocks (Structure -> Blocks -> Add Block) but it is harder to create new regions since this would require changing the CSS of the theme. Two main changes that we had to make in terms of tweaking the design of the theme itself were firstly changing the height of the slideshow on the front page and secondly adding padding settings so as to have image with inline text. And the file to change is usually the style.css of the theme and is normally located at $DRUPAL_Home\sites\all\themes\$THEME_name.
Drupal by default provides two content types; Basic Page and Article. Content types allow you to create web pages, defining the value for each part of a page in metadata fields that users update using forms. It is possible to create custom types (Structure->Content Types->Add New Content Type). In our case we created a custom content type for customer content and the Blog module provides us with a blog content type. The whole idea of having a separate content type for our customers was so that all of our customer details could be published or viewed as a single and coherent page (using the Views module). The same concept was applied to for our blog page.
Drupal SEO settings and Modules
By default Drupal generates URLs that look something like: http://www.example.com/?q=node/77. As far as SEO is concerned, this is a problem. But Drupal has an in-built setting which can be enabled to have Clean URLs if the web server has the Apache mod_rewrite module installed. The Clean URLs can be enabled from Configuration -> Search and Metadata -> Clean URLS.
PathAutho is possibly one of the most powerful Drupal SEO modules and allows leveraging the power of the Token module to get URLs in shape. We would recommend using it to make sure descriptive, keyword-filled URLs are a part of every node that is published.
Global Redirect module helps to enforce the clean URLs and remove trailing slash from URLs. If we create a node with path auto it has 2 URLs like SITEURL/node/2 and SITEURL/about-us, so as a search engine it sees duplicate content which can be penalized.
Keywords are the words or phrases that users submit as a search query to one of the search engines, and they are one of the most important parts of optimizing for search engines. We should always place keywords in the title. Obviously, search engines pay close attention to the words and phrases placed in the <title> tag. Using the Page Title module can be a big help in setting separate titles for the page and content. It is also important to place the keywords in h1, h2 and h3 tags. And placing important keywords at the top of the content can also help since keywords that are near the top of your content carry more weight than those lower on the page.
A note on Drupal Accounts and Security
Out of the box, Drupal administrator page can be accessed through http://www.yoursite.com/?q-user after successfully logging in. And by default, it allows any user to create a new account which is of course moderated by the site administrator (Email notification sent to administrator whenever an account request is actioned). But as in our case, we do not require users to have an account for our site and hence there is not point getting emails notifications from users who want to create an account for our site. So we disabled the account creation for everyone except the administrator from Configuration -> Account Settings -> Registration and Cancellation.
Drupal is great if you want to quickly create a website with Web Content Management capabilities. A large driver behind moving to Drupal for our website was our ability to start blogging about some of the great projects we are working on and share that ECM experience with you. Hopefully this first blog will be the start of this process.