Unequivocally, 21st century is considered as an innovative era, and there is no doubt to the fact that having a website contributes largely to the innovation.
Owning a website is like owning a business card, it is an essential segment that shouts “I am a professional, who is open for business”. So, if you have a website, it would typically be the very first interaction for an individual that would create an impression for your potential client.
When it comes to a law firm website, these potential clients always look for reliability and confidentiality. They need a strong shoulder to lean on, and nothing works better than Drupal.
If you ask - Why Drupal?
Well, mainly because a law firm website would always wish for safety against hackers and smooth performance over high load. Drupal creates a solid and reliable impression when it comes to both these sectors.Drupal is a Good Option for Your Law Firm Website
According to a survey conducted by “Legal Trend Reports”, nearly 37 percent of the population search for a lawyer online. Which means that for succeeding in an industry it is important to have an attractive, robust and secure website.
And this is how Drupal does the task.Builds Togetherness with the Community
Drupal is a free and open source content management system with an active community constantly creating free elements for the website in the form of modules, themes, and distributions.The large community grinds Drupal like a valuable gem to absolute perfection by constantly keeping its hand on modern innovations.
The open source platform is supported by an active community of more than 1 million members who are constantly trying to make it more flexible than other platforms in the market. The CMS has been providing immense support to its users by presenting a helping hand in form of creating documentation, sharing networking opportunities, granting them with valuable modules etc.
Headless Drupal awarding you with user interaction
Whether you call it “Decoupled” or “Headless” content management system, using Drupal as your central content service can power up your entire application and device ecosystem.The mantra of the web development strategy “Write once and publish everywhere” has been grabbing the eyes of several law firm website owners.
The concept of decoupling also implies the managing of different content layers separately, with an agnostic presentation layer. To be precise, it is the communication between backend and the frontend via API.
Rocky mountain victim law center (RMVLC) is a great example of this methodology. The website houses a program which is known as the Legal Information Network of Colorado (LINC). On the basis of a series of questions, this web app provided people with exact legal information and resources. The goal of this program was to empower victims of crime. A better way to make them understand their legal options in the aftermath of victimization. The victims were presented with the advantage to answer a series of questions about the mishap which resulted in a custom list of actionable resources.
Access your website anywhere
When we talk about “better user experience” - mobile compatible websites has turned out to be an important factor for marketers, organizations, corporates, and advertisers
This is because according to FindLaw studies, nearly 72 percent of mobile users say that it is important for a website to be fully optimized for mobile use. That means that the website should be accessible to people in any device.
Drupal is the CMS which provides the users with multiple themes that are mobile responsive and layout centric. The platform has replaced PHP template with all new Twig template in its latest update which not only makes it easy and flexible for the users to use but also provides them with fast, secure, and manageable website.
Thereby, Drupal's responsive designs have helped websites to respond to each visitor’s needs by adapting its presentation based on the size and capabilities of the device which is being used.The website of JCWI, which aims to provide justice to all the immigrants, is built on DrupalMastering Multiple sites
Large law firm websites consist of many committees and promoting any desired initiative on the main website for an individual attorney could be a big hassle. Therefore, the only solution to the whole scenario is to have an individual website or a blog that is separate from the main website yet a part of it.
Therefore, Drupal contributes largely to simplify the management of the websites with the help of the multisite feature. It allows you to serve multiple sites with the help of single codebase. The requirement is only to maintain one copy of Drupal core and, of course, the contributed modules. In other words, it brings about a manageable code across multiple sites and brings agility while launching new sites.
A great example of the multisite feature is the Legal services corporation which provides legal assistance to low-income citizens. The website is a collection of six other sites with the main agenda of providing easy maintenance to the LCS staff while they update the website. Therefore, Drupal was chosen based on the fact that it powers multisite functionality and consisted of one Drupal installation. Not only this but the site also leveraged multilingual support and was compliant with Section 508 of the US Rehabilitation Act.Decoding Multiple Languages
As an attorney, it is possible that you might practice in an area where your client speaks different languages. A translator in such a situation becomes an important factor in the whole journey of communication.
Similar is the case with the audiences that are surfing online. It is necessary to add a multilingual capability to your law firm website due to the fact there is a diverse audience that does not have English as their preferred language. The multilingual feature here not only makes it easy for those users to understand your website content, but it also doubles your chance of being spotted in the Google search result.
Drupal is one of those CMSes that emerges out as a sword for all the website owners with a power of multilingual feature. It grants them with a striking number of over 90 languages that has a built-in translation core.
Apart from translating your content, Drupal also translates all the fields, forms and error messages. The new version of Drupal consists of 4 inbuilt multilingual modules.
This module lets the user pick the choice in which they desire to change the website. It consists of 96 languages in its bar. The language configuration has been streamlined to the user. It assigns languages to everything, from taxonomy terms to administrative language.
It provides the user with a central directory to manage the interface. It has a built-in translation UI for simplifying the content. By allowing the automated downloads and updates, the users easily translate the interface.
This module is applicable to all the contents. It allows the user to translate everything, from taxonomy to pages. Like the translation in the interface, the default language of the content can be configured flexibly.
The things that come with a configuration of the website can be translated with the help of this module. These things include views, blocks, panels, field panels or the text for that matter that can be formatted and be easily translated.
New York County District Attorney’s Office website is built on this multilingual feature of Drupal. The district attorney CY Vance Jr. is the leader in the criminal justice reform who proposed a compelling vision for moving the Manhattan District Attorney's Office with the main agenda of prevention of crime. His objective of the project was to easily reach people with the continuous publication of the content that served as an information portal for the District Attorney.
Drupal was an ideal CMS as it provided with a great platform to build complex websites and was helpful in integrating interactive web services. The key agenda was to reach as many people as possible.
How Can We Forget Security?
In 2016, Panamanian law firm Mossack Fonseca faced a leak of over 2.6 terabytes of data highlighting the risk around data security and the need of companies to protect their client's information.
This clearly indicates that security plays a crucial role for all law firm websites. Visitors want assurance over their data. They want that it should be secured and private.
Drupal is the CMS that is well known for its security. It presents its users with careful testing of all modules which is done by the Drupal experts. The password is encrypted and the community reviews the modules on go. With security modules like security review, two-factor authentication, paranoia etc, the vulnerabilities or loopholes that compromises a website, are largely taken care off. Not only this but, Drupal also meets the Open Web Application Security Project (OWASP) standards which are actively screened to prevent continuous future risks. With the selection of Drupal as your platform, your website is continuously reviewed by the Drupal Security Team. The CMS makes sure that the security vulnerability is reported to them.Module, Themes, and Distribution
Drupal has special modules, themes, and distributions which are specifically created for the law firms.
The law firm creates and shares attorney profiles with potential client quite frequently. This might be a time-consuming and might also slow down the entire process as there can be a number of attorneys lined up for your firm. Thus, to improve the performance and save time for the same, Drupal comes with a module known as profile generator that allows you to find profiles quickly.
The law theme is a free professional mobile-friendly theme for the law website. It is a responsive, mobile first theme for Drupal 8. It consists of features like configurable slideshow, 13 block regions, social media integration, clean HTML5, and so on.
The law firm distribution, which is also known as pre-configured Drupal version containing the core of the entire system, is a set of modules, themes, and libraries. They make the site creation easy and swift.
This is also a fully responsive distribution that features a homepage with a slider, a section for legal industry events, a photo gallery, a section with YouTube videos rendered in a structured way, and much more.Give full attention to the page load time
Having a faster page load speed isn’t only increasing your Google ranking, but it is also contributing to customer satisfaction. Faster page navigation means that users may see more page views each time they visit your law firm website.
Conducted on the behalf of Akamai, Forrester Consulting found out that, 47% of the customer expect to wait no longer than 3 seconds for a web page to load. With the usage of specific modules and methods, Drupal manages to reach marketing goal faster. Modules and methods like:
Caching your pages
Drupal 8 is such an understanding CMS that it enables caching by default for anonymous visitors. The user has the ability to select the maximum limit of the page caching based on how quickly the content of the website changes.
Content Distribution Network (CDN)
The role of a CDN is to store websites on a server, and the CDN module in Drupal provides easy CDN integration to all the Drupal sites. It changes the file URLs so that the file is downloaded from a CDN instead of the server.
Drupal also provides its users with web statistics tracking system called Google Analytics. The module allows the users to add statistics features like single/multi/cross domain tracking, monitoring the links that have to be tracked, monitoring the files that are downloaded, supporting site search, Drupal message tracking etcContent is the King
Note that if your website content does not engage the user then it might not be serving the purpose even if your website consists of great web design. Poor content tends to lose the audience.
Drupal allows its user to edit and customize content without the need of modifying the entire website. With the help of intuitive modules like ctools, field group, paragraphs, entity API etc, the user can build their own content types that have their own set of fields.
According to content marketing institute, 89% of B2B organizations are using content marketing as their strategy of marketing business.Source: Content Marketing Institute
And Drupal is the platform which lets you deliver personalized content and contributes vividly as a content manager.
Drupal would not only contribute to the editing and deleting part of the content but it would also help you to future-proof it. Machines are able to read the content by reviewing the metadata of a website. The metadata structure which is also called as the schemes provide context to the content of a page. Which means that when the search engine views the page they are not only repeating the content but also serve with additional guidance. Drupal 8 uses Schema.org for tagging. Not only this but Drupal has also changed its migration path to provide its user with semi-annual updates which save time, money and a lot of energyYou just can’t ignore the cost factor
If you are choosing the best CMS for your law firm website then it should be 100% free and should have the ability where the user can easily install it without the hassle of purchasing any license or recurring fees.
Drupal comes with the option of choosing from the variety of open source modules that can be used for developing a website adhering to your preference.In the Nutshell
It is evident that Drupal has become a very popular platform for lawyers and law firms, especially among related marketing professionals, and for a good reason, this powerful and versatile CMS offers exactly the right tools and visibility potential to both the existing audience as well as to the new ones.
Opensense Labs has sound experience in building such websites and provide services that help you modify your website. It would be our honor to help you develop a dream site that would not only benefit you in every aspect but would also bring about a planned and systematic architecture for your law firm.
Ping us on email@example.com. Now.blog banner blog image Drupal Drupal 8 Law Firm Website Legal website Drupal community Decoupled Drupal User Experience Multisite Multilingual Site Security Drupal Modules Performance Blog Type Articles Is it a good read ? On
The Drupal Community Working Group is pleased to announce that nominations for the 2019 Aaron Winborn Award are now open. This annual award recognizes an individual who demonstrates personal integrity, kindness, and above-and-beyond commitment to the Drupal community. It will include a scholarship and stipend to attend DrupalCon and recognition in a plenary session at the event.
Nominations are open to not only well-known Drupal contributors, but also people who have made a big impact in their local or regional community. If you know of someone who has made a big difference to any number of people in our community, we want to hear about it. The winner of the award will receive a $1200 USD DrupalCon travel stipend as well as a ticket to DrupalCon.
This award was created in honor of long-time Drupal contributor Aaron Winborn, whose battle with Amyotrophic lateral sclerosis (ALS) (also referred to as Lou Gehrig's Disease) came to an end on March 24, 2015. Based on a suggestion by Hans Riemenschneider, the Community Working Group, with the support of the Drupal Association, launched the Aaron Winborn Award.
Nominations are open until March 1, 2019. A committee consisting of the Community Working Group members and past award winners will select a winner from the nominations. Current members of the CWG and previous winners are exempt from winning the award.
Previous winners of the award are:
2015: Cathy Theys
2016: Gábor Hojtsy
2017: Nikki Stevens
2018: Kevin Thull
If you know someone amazing who should benefit from this award you can make your nomination here.
Happy New Year to everyone! We've prepared an overview of some of our greatest successes in 2018.READ MORE
This time last year, members of the community collaborated on a major update to the DrupalCon Code of Conduct, and it proved to be a success. Indeed, we surveyed attendees after DrupalCon Nashville and asked the following questions:
- “On registration, and during the event, were you made aware of the CoC and how to report violations?”
- 73% answered “yes”
- “Did the existence of the CoC make you feel safer, and more empowered to fully participate at this event?”
- 70% answered “yes”
I also said that we would review the code on an annual basis and it is now time for this year’s review period. I am, therefore, inviting proposals for changes to the code on the community project at https://www.drupal.org/project/drupalcon_coc.
As it will soon be time to commit to printing the program guide and signage for DrupalCon Seattle 2019, we will make a release of the code on the 4th February 2019. Any issues not closed by that point will rollover until DrupalCon Minneapolis 2020.
I’m looking forward to reading your proposals for how we can continue to improve our Code of Conduct!
F. Scott Fitzgerald’s ultra-modernist novel about jazz-age America, The Great Gatsby, has been regarded as one of the best books ever written. It has fascinated the readers by creating a sort of aftermath of wonder. Enter the digital age, there is another ‘Gatsby’ which is getting a wondrous reception and is in the reckoning for being a great tool when it comes to web development.
The emergence of the static site generation, where views are rendered in advance for mitigating the burden on APIs and other backend systems, is proving to be a remarkable solution for great web performance. Gatsby, as a static site generator, can dramatically metamorphose the web performance. It can be a magnificent option in combination with Drupal as the backend for building an enriching single page applications.
No wonder Kyle Mathews, the founder of GatsbyJS, tweeted in 2017:
GatsbyJS: Explained Gatsby Usage Statistics | Source: BuiltWith
Currently, GatsbyJS is on the rise when it comes to its usage as can be seen in the graph above. So, what is it? GatsbyJS, an open source static site generator, stitches together the best of ReactJS, Webpack, routing, GraphQL and other front-end tools into one very enjoyable developer experience.
Features of Gatsby
Gatsby leverages powerful pre-configuration for developing a website. It has out-of-the-box capabilities for spectacularly fast page loads, data prefetching, asset optimisation, code splitting, server-side rendering, service workers, and intelligent image loading.
Following are the reasons that should be considered while choosing Gatsby:Well-architected plugin system
Gatsby can scale to the entire internet as it builds the site as static files that can be deployed with ease on numerous services. It helps in letting go of intricate deploys involving databases and servers, their time-intensive setup costs, maintenance among others.Performance and Progressive Web Apps out-of-the-box
Gatsby enforces best practices and optimises your site by default. When the build process runs, static HTML files are created for individual pages to offer swift initial load times.
When the page is loaded by the browser, Gatsby boots up React and navigates around your site as if you were navigating through a single page application with near-instant transitions without page reloads.
Gatsby can offer offline support as well with the addition of a single plugin thereby making your site into a full-blown progressive web app (PWA).JAMstack setup
Drupal is great for its provision of intricate page layouts or content modelling with numerous sections per page. It is an amazing solution for the teams with multi-stage content creation and assessment processes. Decoupled Drupal is an astounding solution for building enterprise-grade websites and has the deep-rooted support of Drupal Community leaders.
Leveraging the benefits of Drupal with Gatsby is an amazing approach towards getting an enterprise-level CMS for free in addition to modern development experience and the merits of JAMstack such as security, scalability and performance. One of the great examples of implementation of decoupled Drupal and Gatsby can be seen through the demo site of Umami Food Magazine which is powered by Contenta CMS, headless Drupal distribution, and GatsbyJS.
Incorporating Gatsby in a decoupled Drupal setup enables you to access the impressive content architecture and access workflow capabilities of Drupal 8 in addition to the splendid UI creation and performance toolset of Gatsby. Moreover, both Drupal and Gatsby are open source, have a huge and active community presence and a wonderful ecosystem of add-on modules or plugins. To add to that, the built-in web services of Drupal 8 streamlines the integration process.Demonstration
To integrate Gatsby to a new or existing Drupal site, gatsby-source-drupal plugin is added to the Gatsby site. Gatsby-source-drupal plugin is a source plugin that is used to pull data into Gatsby from Drupal sites and it does so with the help of JSON:API module. It is followed by configuration of the plugin with your Drupal credentials and hosted URL. You can, then, access the Drupal data with the help of GraphQL queries.
A digital agency exhibited a demonstration that pulls Drupal content into a Gatsby site. It had a Drupal 8 site already installed and created a content type named Coffee with three fields: Title, Body and Image. Drupal was made into an API server with the installation of JSON:API and JSON:API Extras modules. For accessing the JSON API resource list, anonymous user permission was given.
This was followed by building process of Gatsby site called coffees.gatsby by making sure that the node and npm are installed on the computer. Then, the content was fetched from the Drupal server. For this, a simple page was created to display all the coffee types from the Drupal site.
Then, gatsby_source_drupal plugin was used to read Drupal content from the default endpoint /jsonapi. GraphQL was utilised to query all the coffee nodes from Drupal. Finally, the Gatsby site was published by simply copying or pushing contents in /public to the server.Conclusion
Gatsby is an incredible static site generator that streamlines the process of creating blazing fast websites. Gatsby extracts data from sources like Drupal and then uses that data for generating static pages at build time. The data sourced from numerous backends can even be merged. This technique helps in extracting the benefits of both static sites like speed, ease of deployment etc. and the content management systems like the easy update process, user-friendly editorial interface etc.
Coming together of Drupal and Gatsby renders incredibly fast static pages and then merges that with traditional React for user authentication and personalisation.
We are committed to the provision of ambitious digital experiences with our expertise in Drupal development.
Contact us at firstname.lastname@example.org to get the most out of Drupal + Gatsby integration.blog banner blog image GatsbyJS Gatsby Decoupling Drupal ReactJS React Drupal 8 Drupal GraphQL JAMstack Progressive Web Application Progressive Web App PWA Blog Type Articles Is it a good read ? On
Former school teacher turned technologist, Clayton now applies his background in linguistics, community organizing and web development as a user experience architect for Agaric and co-founder of Drutopia.
Clayton has worked with universities, open source companies, tech diversity advocates, prison abolitionists, and others to translate their organizational goals into impactful digital tools with meaningful content.
Aside from content strategy and information architecture, Clayton also enjoys… Read more
David has been doing web development for 12 years now and Drupal development for the last 6. In his early days as programmer he read about the Free Software movement and immediately wanted to be part of it.
Mauricio Dinarte is a passionate Drupal developer, consultant, and trainer with over 7 years of web development experience. After completing his BS in Computer Science, graduating with the highest GPA among 181 students, he completed a Masters in Business Administration.
Mauricio started his Drupal journey in 2011 and fell in love with Drupal right away. Through the years, he has worked on projects of large scale playing different roles such as site builder, themer, module developer, and… Read more
Micky is involved in the “free software for community building” movement and the Platform Cooperativism movement. She helps Agaric's work contribute back to these movements. She also handles some administrative tasks, public outreach, and support as part of the team.
Micky is a worker/owner of Agaric and a member of the “free software for community building” movement - using tools like VOIP, Drupal, and GNU/Linux. She is liaison between the US Solidarity Economy Network (SEN) a group devoted to ongoing dialog on… Read more
Benjamin lives and works to connect people, ideas, and resources so more awesome things happen.
A web developer well-established with Drupal and PHP, he has also been enjoying programming projects with Django and Python. His work with Agaric clients has included universities (MIT and Harvard University), corporations (Backupify and GenArts), and not-for-profit organizations (Partners In Health and National Institute for Children's Health Quality). After ten years in the internet technology,… Read more
EK application has a module that store personal documents for user. When user account is deleted, those documents may be transferred to another account.
To achieve that, we need to alter the user account cancel form when building the form, validating and submitting it.
Let's review the 3 steps.
The form before altering it looks like this
We need to add a field to select another user account to which the document of the canceled account will be moved to.
To achieve that we Implements hook_form_alter() in MyModule.module:
Digital transformation is at the helm of every enterprise to keep up with the rapid technological advancements. The New York Times, a leading international news media, leads by example in such changing times. It is not just known for its premium content but also for the astronomical presence both in the print and the digital medium. React has been at the forefront of its digital evolution to make its site faster and easier to use for both the readers and the developers alike.
React: The Incipiency
Large organisations like the New York Times are leaping forward with their inclination towards best-of-breed web technologies like React. Any front-end technology React would require a RESTful service-based backend for storing data and implementing business logic. This is where Drupal makes a big impact with its RESTful services that are built into its core. Before we move onto the exploration of the amazing duo of Drupal and React, let’s explore React.
The biggest obstacle with XHP was that dynamic web applications needed numerous round trips to the server which could not be achieved by XHP. This paved the way for ReactJS. FaxJS was the early prototype of React which came into the limelight in 2011. Ultimately, in 2013, React was introduced and open sourced.
Provision of declarative views
With its declarative views, your code becomes simpler and foretellable while debugging thereby allowing you to develop interactive UIs and design streamlined views for each state in your application. In case of any alterations in the data, React can let you efficaciously update and render the right components.Facilitation of writing components
React Native is advantageous for its portability and the ability to reuse components, real-time reload and modular architecture, open source and generous ecosystem.React + Drupal
As an open source content management system, Drupal has witnessed a staggering growth over the years (as can be seen in the graph below). It offers a magnificent suite of tools for data modelling, editorial workflow implementation and the coding custom application logic. It has spectacular support for JSON API or GraphQL web services which makes it a splendid choice as the backend for a React application.Drupal Usage statistics | Source: Builtwith
Whether few of the elements on an existing web page has to be enhanced or a fully decoupled single page application needs to be created, the duo of Drupal and React can do it all. Implementation of Drupal and React together can be performed with a fully decoupled or headless approach; and progressively decoupled approach.Decoupled or Headless Drupal with React
With the powerful web APIs, Drupal simplifies the creation of headless applications. Several lighthouse applications have been created with Drupal as the backend and powerful demo systems and starter kits like Reservoir and Contenta have burst onto the scene.
In a headless approach, Drupal is leveraged as the backend for a frontend application built in React. Usually, headless applications are utilised for showing content and the editing of content is still done in the backend. But React can also be used for the creation of wonderful editorial experience. With Drupal’s powerful REST APIs, integration of a decoupled editing system can be done. Drupal Europe 2018 had a session that demonstrated how to create an enterprise-level editorial experience for Drupal 8 with the help of React.
Progressively Decoupled Drupal with React
It exhibited a decoupled application with React that can let you edit content directly in the frontend. Leveraging React to the fullest, a modern editorial experience was created with in-place editing, context-sensitive editing, drag-and-drop content placement and creation and a lot more.
OpenSense Labs has revamped the website of the Produce Market Guide (PMG), a resource for produce commodity information, fresh trends and data analysis, with help of progressively decoupled Drupal and React among others.
ElasticSearch Connector and Search API modules were utilised for the creation of mapping and indexing on Elastic Server. The development of Elastic backend architecture was followed by the building process of faceted search application with React and the integration of the app in Drupal as block or template page.
The project structure for the search was designed and developed in the sandbox with modern tools like Babel and Webpack and third-party libraries like Searchkit, which is a suite of React components that communicate directly with Elasticsearch cluster, turned out to be of great help with its fully customisable solution.
Logstash and Kibana, which are based on Elasticsearch, were integrated on the Elasticserver for collecting, parsing, storing and visualising the data. The app in the Sandbox was developed for the production and all the CSS/JS was incorporated inside the Drupal as a block thereby making it a progressively decoupled feature.
Drupal and React together can help enterprises to leap forward in the digital space. Drupal’s RESTful services-based backend and React with its amazing capabilities as the frontend can prove to be a remarkable solution.
We remain steadfast in our goals of fulfilling the digital transformation endeavours of our partners with our suite of services.
myDropWizard.com: We've made 99 Drupal 6 Long-Term Support releases... what does that mean for Drupal 7?
In that time, we have made 99 releases (both Drupal core and contrib) for D6LTS!
Most of those were security releases, but there were also a handful of bug fixes, and most recently, updates to support PHP 7.2. (FYI: As of a couple days ago, PHP 5 has also reached it's End-of-Life (EOL) - do you have a plan to update to PHP 7.1 or 7.2?)
When we were first talking to potential customers about D6LTS, I remember many people doubting that we'd be releasing anything at all!
They'd say something like "Drupal 6 has been around so long, aren't all the security issues shaken out by now?" Almost 100 releases later, and I'd say there was plenty to be done. There still is! :-)
In this article, I'm going to look back on Drupal 6 LTS, and also look forward to what that may mean for Drupal 7 extended support after it reaches its End-of-Life.
Morpht: Drupal and Composer: Part 3 — Converting Management of an Existing Drupal 8 site to Composer
As any developer working with Drupal 8 knows, working with Composer has become an integral part of working with Drupal. This can be daunting for those without previous experience working with command line, and can still be a confusing experience for those who do.
This is the third post in an explorative series of blog posts on Drupal and Composer, hopefully clearing up some of the confusion. The four blog posts on this topic will be as follows:
- Part 1: Understanding Composer
- Part 2: Managing a Drupal 8 site with Composer
- Part 3: Converting Management of an Existing Drupal 8 Site to Composer
- Part 4: Composer for Drupal Developers (Coming Soon)
So you’ve worked your way through parts one and two of this series, and you now understand what Composer is, how it can be used to work with Drupal 8, and how to start a new Drupal 8 project using Composer. But, you started your current project without using Composer, and want to switch to managing your project using Composer. Where do you start? This article will discusses a few strategies behind converting your existing system to Drupal. Fortunately some automated tools exist for converting existing sites to Composer, and in the situation that neither of these tools work, an overview is provided on how to manually convert an existing site
But, before moving on to any of these methods...
Take a backup! As this process will be destructive to your system, make sure you take a backup of your file system, and take a backup of your database. Then go and check to ensure that you have a full backup of the file system, and a full back up of the database.
If you skip this step, or do not do it properly, you may end up with an entirely broken system, so don’t skip this step.Method 1: Composerize (Composer plugin)
Composerize Drupal is a Composer plugin that has been built to convert existing Drupal installations to use Composer. Instructions are on the download page. If this method doesn't work, you can try the Drupal Composerize module:Method 2: Composerize (Drupal module)
The Composerize module is a Drupal module that is built to convert existing Drupal installations to use Composer. At the time of writing, this module has the following disclaimer on the page:
If this method doesn't work, you'll likely have to manually convert your site.Method 3: Manual method
If the above steps fail, your last option is to convert your installation to using the Drupal Composer Template manually. Note that pretty much every system will be different, so these instructions are an overview of the end goal, rather than a complete set of steps that will convert your system. There is a good chance you’ll run into issues along the way that are not covered here, so make sure you took that backup!
Converting a system to the template requires achieving the following goals:
- Setting up the file structure of the system to match the Drupal Composer Template
- Delete old Composer files
- Add the Template file system to your Drupal system
- Set up the configuration directory and the private files directory
- Set up your profiles, modules and themes to be managed by Composer
The Drupal Composer Template is set up to manage the directory above the webroot, as well as the webroot. The webroot is located in the [PROJECT ROOT]/web folder. Therefore you will need this structure:
/- Project root. Contains various scaffolding files such as composer.json and composer.lock, as well as the configuration export folder, and the webroot folder
/web- The webroot. Contains all Drupal core, profile, module and theme files.
You'll need to set up your Drupal installation to match this structure, and make sure that the server is set up so that the web root is at [PROJECT ROOT]/web.
Note: Some servers require the webroot to be in a directory with a specific name, such as
www. In this case, you can try setting up symlinks from the required directory name to the
/web directory, so that, for example,
[PROJECT ROOT]/public_html is a symlink pointing at
[PROJECT ROOT]/web. Your Drupal files will then reside in the
/web directory (satisfying the Drupal template), and also be accessible at
/public_html (satisfying the server requirements). If this does not work, another option would be to edit the composer.json file (which is added in step 3) and change any paths that point at the
/web directory, to point at the directory name you are actually using.
I'll say it again, because it needs to be said, make sure you took that backup in step 0!
If any of the following files or folders exist in your installation, delete them. Note however that you may want to save the composer.json file for reference if you've manually added any libraries into your existing installation using Composer.
Go here, click 'clone or download' and download the .zip file (note - or clone the Git repository if you prefer)
- Save/move the zip file into the project root folder (the directory above the 'web' folder you created above). You can then unpack it using the following command. Before this step, the file
/composer.jsonshould not exist. After this step, if you've done it correctly, this file will exist.
tar -zxvf [FILE] --strip-components=1
- Run the following command from the project root folder. This command will Install the Composer dependencies as well as create the
- Run the following to ensure your database is up to date, and caches are cleared.
drush updb; drush cr;
This next step is optional, however it will make for a more secure system. First, the following directories need to be created if they don't already exist:
The first folder is where exports of the Drupal 8 configuration system will be exported to. The second folder is the private files folder. Creating both of these directories as siblings to the webroot adds security, as the files are not in a web-accessible location. The next thing to do is tell the system of the location of these files. This is done by declaring the folder paths in settings.php. You can do this by adding the following two lines to the bottom of settings.php:
$config_directories['sync'] = '../config/sync';
$settings['file_private_path'] = '../private';
After this, clear the registry (
drush cr;). You can confirm that the configuration directory was properly set by running
drush cex sync, and then checking that there are .yml files in the
[PROJECT ROOT]/config/sync directory. You can confirm that the private files folder was properly set by going to Admin -> Configuration -> Media -> File System, and confirming that the private files directory is listed as
The final step is to set up Composer to manage Drupal profiles, modules and themes to be managed by Composer. The Drupal Composer Template tracks Core by default, but needs to be informed of the rest of your code. Note that if you do not want to use the most recent version of these profiles/modules/themes, you will need to alter the commands below to set the version you want to install.
Drupal profiles, modules and themes can be installed with the following command:
composer require drupal/[PACKAGE NAME]
For example, if you were using the Administration Toolbar module (admin_toolbar), you would run:
composer require drupal/admin_toolbar
After you have done this, ensure you are up to date with a DB update and cache clear:
drush updb; drush cr;
At this point, your system should be converted to the Drupal Composer Template, with contributed code being managed by Composer.Summary
This article looks at converting exiting Drupal 8 sites to being managed by the Drupal Composer Template. Doing this can potentially be automated using the Composerize Composer plugin or the Composerize Drupal module. In situations where this does not work, the manual directions in this article can be used as an alternative.
In the next and final part of this series, we'll look at how Drupal developers can integrate 3rd party libraries into their custom Drupal profiles, modules and themes.
The Drupal we all know and love is evolving. The learning curve is shifting, the development paradigm is different, and the community, not only the software, is more ambitious. We felt it was time to build Drupal.tv as a thank you to the wider community. Drupal.tv is live as of January 1st, 2019!
From the community spotlight on Drupal.org: “He's the fellow that is dashing from room to room before the first session begins to set up the AV equipment and checking in with presenters making sure they all "push the red button". Because of him, we are all able attend the sessions we miss while busy elsewhere. He is personally responsible for recording over 800 sessions and donating countless hours of his time.”
Hear his thoughts on the unofficial Drupal recording initiative ( https://www.drupal.org/association/blog/introducing-the-unofficial-drupal-recording-initiative ).
Thank you, Kevin!
A Tweet to start it all
In Oct 2018, Rachel Lawson (@rachel_norfolk) tweeted: “It strikes me that creating a “DrupalTV” site, collating all YouTube session videos, would be possible in Drupal core these days. Tagging, searching, the lot. Could be a fun project? I’m sure one of our hosting providers would help…”
As fate would have it, Ashraf Abed (@ashabed) of Debug Academy was looking for the upcoming semester’s class project and came across the tweet. Debug Academy always does a real, new project in class as it’s the best way to learn programming and to build credibility.
Yes, newbie Drupalers built this site.
Drupal’s learning curve is shifting. The focus of many ongoing core initiatives is improving developer experience, and not only for senior programmers.
This project was built (& continues to be built) by a team of new Drupal developers, led by one Acquia “Grand Master” certified Architect (Ashraf Abed, Debug Academy’s CEO).
The backgrounds of the team include (but are not limited to):
- 4 experienced backend developers with 0 Drupal experience
- 1 experienced front end developer with 0 Drupal experience
2 self-taught web developers with 0 Drupal experience
- Former career: Library and Information Science
- Former career: Teacher (PHD in history!)
- 2 self-taught with light site building experience in earlier versions of Drupal
- 1 Drupal Grand Master / Architect (Ashraf)
To illuminate this a bit more: Ashraf was not allowed to contribute any code on the project during the semester, which ended on December 22nd, 2018 (1 week before this site’s launch). That is to ensure that the new developers gain proper experience building the project. So the majority of this project truly was built by non-Drupal developers. We’ll share more about those developers in an upcoming article, with their permission.
And if you’re thinking “the experienced backend developers did most of the work”, that simply is not the case. The majority of the work on the project was contributed by the rest of the group.
Furthermore, as is the naturally occurring case with most Debug Academy semesters, the development team was highly diverse. Over 70% of the team members come from backgrounds that tend to be minorities in our field, and we were lucky to benefit from their ideas and expertise.
What’s now and what’s next?
Kevin Thull provided us with a list of DrupalCamp videos, of which we’ve imported 100%. Thanks to Wendy Abed, Kevin, and Ashraf for importing the DrupalCamp and DrupalCon videos. We’re at over 3,500 videos!
In the near future, we will also add free Drupal training videos created by various providers. All videos on this website will always be free.
You may have noticed some videos are tagged with conferences. In fact, all videos are tagged with conferences, but you can only see the published ones.
We ask DrupalCamp organizers to reach out so that they can populate their own conference pages. Debug Academy’s next cohort will built out the conference (meetups, Drupal Camps, Drupal Cons) functionality on the website to make conferences (past & future) easy to find.
Searching / Sorting / Filtering
The site’s search is powered by the Search API module(s). The plain text search actually works quite well - search for a conference name, a topic, etc, and you will find all videos from that conference/topic.
As part of next semester’s project, we will be tagging talks with topics and speakers, which will enable us to use faceted search on the website.
We want this site to be globally useful. We plan to import video captions as well as and enable the multilingual features available in Drupal core. And if you are recording Drupal conferences in your country, reach out to us with your youtube playlist!
Video submissions are open to the public! Approved content administrators will have the ability to import entire playlists from youtube, but anyone can import an individual video! Anonymously submitted videos will be created as “Drafts”, and our team of alumni and approved moderators will approve appropriate videos (thanks, Drupal core content moderation!)
Debug Academy students and alumni will continue to build and maintain the website as a non-profit project for the Drupal community. We will periodically share articles about what new Drupal developers were able to build using the website.
After next semester’s project, we may reach a point where smaller Drupal Camp events do not need to create/maintain their own website. Instead, they could simply create a conference page on Drupal.tv and use their time on higher value initiatives, like running a great conference, as usual! :)
How can you help?
At the moment, we have plenty of development capacity for the project, and we would like this project to continue to enable graduates of Debug Academy to land their first full time jobs as Drupal developers. You can help by spreading the word!
Follow us on twitter @drupaldottv, sign up for our newsletter (in the footer) to hear about new videos and articles, and simply share this website to the wider Drupal community!
We'll be reaching out to our alumni to do a separate piece on them with their inputs and permission. We launched on New years, but it turns out that's an inconvenient time for many contributors. Who would've known?!
And I’d like to give a special shout out to the founder of Drupal, Dries Buytaert, for allowing us to use the domain drupal.tv for this project!
Happy new year, everyone!
A lot of my work over the last few years has been working on migrations between various versions of Drupal. That usually means that I need to configure a local Drupal development environment with more than one database. And although this is relatively easy to do with Lando, I often have to look up how I did it before. So, I figured I should write it down and share with everyone else at the same time..lando.yml
Adding a database to an existing Lando environment is as easy as adding a few lines to the
.lando.yml file and restarting.
.lando.yml file might already have configuration in it. If the
services line already exists, just put the new configuration underneath with the correct indentation. You can see examples of more complex configuration files at any of the links in the previous paragraph.
Now, you will need to tell Drupal about the new DB. To do this, go to the command line and type lando info. In the output, you should see something like this:
"port": "not forwarded"
With that information, you can add the new DB configuration to Drupal's
$databases['old_db']['default'] = array (
'database' => 'database',
'username' => 'mysql',
'password' => 'password',
'prefix' => '',
'host' => 'legacy',
'port' => '3306',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
Note that, by default the host name is going to correspond to the name of the service/container and will not necessarily be the same as the name of the database (or the name of the Drupal DB alias, for that matter). In other words, you should find the host and port values in Lando's
internal_connection array. If, for some reason, you need to have a custom database name, credentials, port numbers or something else, you can refer to the links above.