JCS Blog

Upgrade to Drupal 9: No coding skills required

10 months 2 weeks ago
Upgrade to Drupal 9: No coding skills required bhavinhjoshi Wed, 09/29/2021 - 12:10
  • bhavinjoshi [at] joshics [dot] in ()target="_blank" rel="noopener external nofollow"

Drupal 8 too will be faced out soon. You should upgrade your existing Drupal 7 or Drupal 8 website to Drupal 9 ASAP. This ensures that your Drupal 9 website will continue receiving security updates & new features from the Drupal community.

 

Drupal 9

Drupal 9 offers many enhancements and new features including, but not limited to:

  1. New layout builder
  2. WYSIWYG media management system
  3. Content workflow tools
  4. API first architecture
  5. New Admin interface
  6. New default theme
  7. Uses composer 2
  8. PHP 8 ready
  9. Easy to upgrade to major future core release i.e., Drupal 10
  10. Automatic core updates
Preparation:
  1. Make sure your existing Drupal 8 website is running at least 8.8.x core version. If not, update it using this guide: Update to Drupal 8.8
  2. Take backup of your existing Drupal 8 codebase & DB
  3. Get the latest stable release in Drupal 9 branch.
  4. Upgrade your composer to version 2.0.
Process:
  1. Remove both composer.json & composer.lock from existing Drupal 8 website.
  2. Delete vendors directory.
  3. Overwrite your Drupal 8 website codebase with latest Drupal 9.x files. Preserve all the files/directories you created/added.
Validation:
  1. Execute composer update
  2. Execute drush updb
  3. Execute drush cr
Confirmation:
  1. Access your upgraded website from the browser and confirm all the features are working as desired.

If you see errors at any stage during the upgrade process, you may need to apply a patch or two for specific contributed/core modules/themes. And this may require some coding skills!😉

Drupal Drupal 8 Drupal 9 Drupal Planet Do you like this? Share it! Subscribe to Drupal news from Joshi Consultancy Services Email Address I agree to the privacy policy
bhavinhjoshi

Drupal 8 Multi site configurations

1 year 7 months ago
Drupal 8 Multi site configurations bhavinhjoshi Fri, 12/25/2020 - 11:27
  • bhavinjoshi [at] joshics [dot] in ()target="_blank" rel="noopener external nofollow"

Why maintain multiple Drupal 8 or Drupal 9 codebase when you can use a single codebase across multiple sites/domain!

To create multiple Drupal 8 sites using a shared Drupal 8 code base, you must complete

the following steps:

1. Create a new database for the site (if there is already an existing database you can also use this by defining a prefix in the installation procedure).

2. Create a new sub directory off of the 'sites' directory with the name of your new site. (e.g.,sites/dev.YourDomain.bhj/) See the comments in the default.settings.php file for information on how to name the sub directory.

3. Copy the file sites/default/default.settings.php into the sub directory you created in the previous step. Rename the new file to settings.php.

4. Activate the multi-site feature by copying (and renaming) the file sites/example.sites.php to sites/sites.php. There is no need to edit the file unless you need site aliases. The normal site selection rules applies.

5. Adjust the permissions of the new site directory, and grant write permissions on the configuration file (settings.php).

6. In a Web browser, navigate to the URL of the new site and continue with the standard Drupal installation procedure (if you get an infinite redirection loop, check if the file install.php exists in the document root).

Note: It may also be necessary to modify your Web server's configuration file (often named httpd.conf for Apache) to allow Drupal to override Apache's settings. This is true for all installations of Drupal and is not specific to the multi-site install. Example configuration, as in /etc/apache2/sites-available/000-default.conf:

DocumentRoot /var/www/html/YourDomain/web/ ServerName www.dev.YourDomain.bhj ServerAlias dev.YourDomain.bhj "/var/www/html/YourDomain/web/sites/dev.YourDomain.bhj"> AllowOverride All DocumentRoot /var/www/html/YourDomain/web/ ServerName www.dev.YourDomain.com ServerAlias dev.YourDomain.com "/var/www/html/YourDomain/web/sites/dev.YourDomain.com"> AllowOverride All Drupal Drupal 8 Drupal 9 Drupal Planet Do you like this? Share it! Subscribe to Drupal news from Joshi Consultancy Services Email Address I agree to the privacy policy
bhavinhjoshi

Drupal 8: Writing your first Drupal 8 custom module -- info file

1 year 7 months ago
Drupal 8: Writing your first Drupal 8 custom module -- info file bhavinhjoshi Wed, 12/23/2020 - 12:47
  • bhavinjoshi [at] joshics [dot] in ()target="_blank" rel="noopener external nofollow"
Drupal 8 custom module structure

Drupal 8 has been rewritten from scratch and it heavily uses OOP. And this affects all the way we write code for Drupal 8, be it a custom module for your project or a contributed module that you want to publish on drupal.org



Let us dive into the details and learn how to write a custom module for Drupal 8!

In this first article of the ‘Drupal 8: Writing your first Drupal 8 custom module’ series, we will explore the details of the info.yml file.

 

The info file

With slight modifications, the info file is almost identical to previous versions of Drupal. However, in Drupal 8, it is known as info.yml and a few extra parameters/instructions/routines for Drupal 8



In Drupal 8, info.yml file takes following details/routines:



type*: Is this a module or theme or even a distribution/profile? Allowed values: string module|theme|profile



name*: Name of your custom module/theme/distribution/profile Allowed value: string [A human readable name which will be displayed on Modules list page] GeoBlocker



description*: some descriptive text about your custom code. Allowed value: string [details about what your module offers]



core*: What Drupal core version this custom code targets. Allowed value: 8.x (Post Drupal core 8.8, this routine is no longer required)



package: In what group you want to put this custom code in. If you do not specify this routine, Drupal puts your custom code under ‘others’ on modules list page. Allowed value: string Geo



core_version_requirement: Specifically used to denote that your custom code/module is compatible with Drupal 9 and can be used on a Drupal 9 website without modifying code.

  Allowed value: ^8 || ^9



configure: If your module offers a configuration page, you need to provide reference to relative path to the configuration page here, as in your routing.yml file.



* required routine

 

Here is an example of actual Drupal 8 / 9 module info.yml file

type: module
name: GeoBlocker    
description: "Restricts or allows access to the website, or to a subset of nodes, in regards of user's country of origin."
configure: geoblocker.configuration_form
package: Geo
core_version_requirement: ^8.8 || ^9

Drupal Drupal 8 Drupal 9 Drupal Planet Do you like this? Share it! Subscribe to Drupal news from Joshi Consultancy Services Email Address I agree to the privacy policy
bhavinhjoshi

Drupal 8: Update to Drupal 8.8 in five minutes

2 years 7 months ago
Drupal 8: Update to Drupal 8.8 in five minutes bhavinhjoshi Fri, 01/03/2020 - 15:04
  • bhavinjoshi [at] joshics [dot] in ()target="_blank" rel="noopener external nofollow"

Finally, we are one more step closer to Drupal 9. In order to make your Drupal 8 website ready for Drupal 9, you will need to update your existing website to Drupal 8.8, the latest stable release in 8.8.x branch. This branch removes all the incompatible APIs and prepares your website for Drupal 9. And which is why, It is highly recommended that you update to 8.8.

Before you start with the update, make sure you take backup of your website (code base & DB) or preferably, carry out this process on a staging site or on your local Drupal 8 set up. For this, it is assumed that you have composer installed for your Drupal 8 environment.

Modify composer.json

 

The first step is to modify composer.json manually.

1. Unset / empty “replace”: {},

2. Remove "merge-plugin" entirely.

3. Append “App\\”: “app/”, “”: ”src/” to “autoload”

Once you are done with modifying the composer.json, it is time to execute a few commands with composer on CLI.

Execute composer commands

composer remove webflo/drupal-core-strict --no-update

composer remove drupal/core --no-update

composer require 'composer/installers:^1.7' --no-update

rm composer.lock

rm -rf core

rm -rf vendor

composer require drupal/core-recommended:^8.8 --update-with-dependencies

Now, sit back and relax while composer performs the update. Once the updates are downloaded, it is time to perform the db updates using drush updb. Congratulations! You have successfully updated your existing Drupal 8 website to 8.8 and you are now ready for Drupal 9!

Trouble? Get Help Drupal Drupal 8 Drupal 9 Drupal Planet Do you like this? Share it! Subscribe to Drupal news from Joshi Consultancy Services Email Address I agree to the privacy policy
bhavinhjoshi

Ways to contribute to Drupal community

2 years 8 months ago
Ways to contribute to Drupal community bhavinhjoshi Thu, 11/28/2019 - 15:58
  • bhavinjoshi [at] joshics [dot] in ()target="_blank" rel="noopener external nofollow"

When was the first time you decided to write some generic code and publish on Drupal.org? Thank you for taking that decision! That idea has grown big and your code is might be in Drupal core now! You still remember about views and CCK, right?

Drupal community is driven by you, me and all the users who want to build awesome websites using Drupal. One way or the other, we enrich the community by sharing tips in forums, on various Drupal channels and events we take part in. Some of us take this to next level by volunteering at those events and make everything easier for us! We are not stranger to each other anymore as we used to be a decade ago. We now know everyone from social media, posts in forums, Drupal channels and Drupal events. Isn’t Drupal community amazing?

 

  Help Drupal community to grow further   Build modules

If you have an idea that can benefit everyone, you are welcome to share it with the community. For example, You can integrate third party APIs with Drupal and contribute that code to community. Or maybe some generic code from your latest project! Every bit counts.

  Build themes

Claro and a few other themes are completely community efforts. If you have this awesome design idea, you can consult with other developers and put efforts in to build a theme out of it.

  Submit patches

Of all those projects contributed to community, most of them are well maintained but usually due to the time constraints, maintainers may not be able to address all the issues listed on the queue. You can take this opportunity and help fix those issue. Once done, you can submit the path for a community review. After testing, your patch goes to production version and We Won!!!

  Reply in forum

Usually, new Drupal developers post in Drupal forums. Most of us did when we were first introduced to Drupal. Forums are the best way to help Drupal aspirants and give them what they are looking form – some tips and right approach to a problem!

  Review patches

Lend a helping hand by reviewing those submitted patches on project issue queue. This expediates the process to fix the particular issue and confirms that if particular patch works or not.

  Write a book page or two

Is there something big on your mind that community can get benefit from? You can write a book page or pages and guide the community. This can be some insights about a Drupal feature or a trick you learned while working on your project at your job.

  Help organize events

If an event is going to be organized in your city/country, can you help them anyways? They need help with logistics, building and updating the event website and what not!

  Educate / mentor Drupal aspirants

You can guide both junior and senior developers by helping them with contributing to Drupal in all the ways just described. You can speak at an event and that is a great experience for both new developers as well as senior developers.

  Share tips

Sharing tips is fun! We do it on social media and those Drupal channels on various other platforms on regular basis. When we see someone struggling with an issues with Drupal and post on those media, we rescue them by posting multiple approaches and tips. Sometimes, these conversations take interesting turn and end up being a contribution to Drupal in form of an event, a module or a theme!!

 

You can find all the details about how to get involved on communit page

Drupal Drupal 8 Drupal 9 Drupal Planet Do you like this? Share it! Subscribe to Drupal news from Joshi Consultancy Services Email Address I agree to the privacy policy
bhavinhjoshi

Save money with Drupal 7 website everyday

2 years 8 months ago
Save money with Drupal 7 website everyday krutibjoshi Tue, 11/26/2019 - 12:19
  • bhavinjoshi [at] joshics [dot] in ()target="_blank" rel="noopener external nofollow"

Drupal 8 migration will cost you little higher than the money you spent building your Drupal 7 site. But maintaining a Drupal 7 site after the official support has been withdrawn, will cost you much more than migration to Drupal 8.

Introduction

Drupal 7 will be officially supported till November, 2020. After that, there will be no official security releases and updates. You will have to rely on your vender to identify and fix the issues to keep your Drupal 7 website running and profitable. This may require constant monitoring of website, observing  the users and their behaviour, employing various techniques to identify and guard against brute force or similar attacks to exploit any security vulnerability. This costs both energy and money.

  Cost of maintaining & enhancing Drupal 7 website

If we take an average rate of US $30 per hour, you may end up spending around US $2000 per month if you have lots of enhancements and maintenance going on. Now, consider if you have to monitor your Drupal 7 website continuously and look for security issues in core as well as contributed modules and themes available on https://drupal.org.

If not monthly, you may spend US $2000 every few months to fix security vulnerability and enhancements.

  Cost of migrating to Drupal 8

 

Consider you want to migrate to Drupal 8 and there will be no cost at all when you migrate to Drupal 9, it will be like a minor Drupal version update!

With same rates – Us $30 per hours, with lots (a lot!) of content, users, other entities, your custom Drupal 7 theme and modules, this can take up to 4 – 6 months to migrate and launch your Drupal 8 website. The timeline is entirely based on the customization you did to your Drupal 7 website.

40 hours per week, 4 weeks per months, 4 months to migrate: 40 X 4 X 4 X 30 = US $19,200

This is an investment that will not recur in years to come and will help you earn more revenue by saving as much as US $24000 per year as you will not have to employ continues efforts to monitor your site for security vulnerability and enhancements required by those issues.

  Cost of maintenance & enhancements

At the rate of US $30 per hour, for 67 hours, it will be again around US $2000 exclusively for new features or enhancing existing custom features. But not a single penny for fixing security vulnerability and its effects! That is because soon, Drupal 8 will have one-click minor version upgrade feature which will be available in Drupal 9 as well.

Besides, you will not have to spend to upgrade to Drupal 9. All you have to do is to keep your Drupal 8 website updated to Drupal 8.9 as and when it is released. You are already in Drupal 9!

  Conclusion

With one time investment, you can keep your cost minimum at a later stage and generate more revenue and get a stable Drupal 8 website with little or no efforts. It is the time to act now!

Drupal Drupal 8 Drupal 9 Drupal Planet Do you like this? Share it! Subscribe to Drupal news from Joshi Consultancy Services Email Address I agree to the privacy policy
krutibjoshi

Drupal 9 To upgrade or Not to upgrade

2 years 9 months ago
Drupal 9 To upgrade or Not to upgrade bhavinhjoshi Wed, 10/16/2019 - 15:14
  • bhavinjoshi [at] joshics [dot] in ()target="_blank" rel="noopener external nofollow"
The Drupal 9 Dilemma

We are ready to embrace Drupal 9 but there are still uncertainty about whether to upgrade to Drupal 8 & be prepared for Drupal 9 or continue using Drupal 7.

Introduction

Drupal 8 is complete rewrite from the previous versions that have been released so far. It is mainly created with MVC and OOP architecture on mind and most of the parts of Drupal 8 is built with OOP. This allows it to interface with many other plugins and scripts without having to write separate code specifically for Drupal 8. Drupal 8 borrows most of its features like:

  • handling routing
  • sessions
  • Service container
  • YAML
  • http foundation
  • http kernel
  • process
  • class loader
  • validator
  • translation
  • dependency injection and others

from Symfony to reduce code duplication.

coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe"
filled="f" stroked="f">

















type="#_x0000_t75" style='width:396pt;height:421.8pt;visibility:visible;
mso-wrap-style:square'>
o:title=""/>

Figure 1 Drupal 8 flow

For dependency management, we can now use composer along with Drupal 8. This allows it to go beyond its ecosystem and leverage code from outside. Among the others, Drupal 8 also borrows code from EasyRDF, Doctrine, Twig and Guzzle.

Drupal 8 APIs for developers

Drupal 8 Implements PSR-4 standard for package-based PHP namespace autoloading by the PHP Framework Interoperability Group. If you want to upgrade existing Drupal 7 site to Drupal 8, you will need to use and comply to PSR-4 standards. Drupal 8 follows YAML based configurations and PHP annotations. This makes it fairly easy to interpret and understand.

Developers can learn more about Drupal 8 and take insights on https://www.drupal.org/docs/develop

What’s for me

Drupal 8 is flexible and simple to use with enriched admin interface which is getting updated every day by the Drupal community. This makes it usable in lots of use cases and configurations – stand alone, headless/decoupled and multisite set ups. You can run multiple Drupal 8 sites on a shared-hosting or VPS or even on node based cloud architecture like Kubernetes.

Content admins can post content to multiple or a few selected sites by just installing a few contributed modules. Modules are like attachable parts. Use those you want, remove the others. With Layout builder, content / site admin can customize the appearance of a single page or all the pages of a content type (i.e. A blog post, a tour package etc.)

Current status

The latest development in Drupal 8 is as follow:

  • Layout builder is now stable. It can be used in production environment.
  • JSON:API support is stable.
  • Further improvements in Media library.
  • Revisionable menus & taxonomy terms.
  • Support for Twig 2

Latest release in 8.7.x requires at least PHP 7.0.8

Drupal 8 will be developed and released till June 2020 (Figure 3 Drupal version support & Drupal 9 development timeline). The final expected Drupal 8 version is Drupal 8.8 and from there, Drupal 9 will take over.

 

o:spid="_x0000_i1027" type="#_x0000_t75" style='width:451.2pt;height:153pt;
visibility:visible;mso-wrap-style:square'>
o:title=""/>

Figure 2 Train to Drupal 9

 

Future Development

For a short span of time, Drupal 8 will be supported for security issues post 8.8 release and not further development is expected. All the resources and energy will be channelized towards developing and enhancing Drupal 9. All the prior version of Drupal 8 will receive security fixes and support only.

Drupal 7 and Drupal 8 will be supported by Drupal community until November 2021.

Drupal 9

Drupal 9 will be developed continuously from where Drupal 8 was left. This allows upgrading to Drupal 9 without rebuilding a Drupal 8 site from scratch with Drupal 9. The last release in Drupal 8.x branch will be compatible to Drupal 9 without effecting any APIs or features built for Drupal 8.

Key points
  • An upgrade from Drupal 8.
  • Fully compatible with Drupal 8.
  • Six-month release cycle.
  • More libraries integrations.
  • Leverage Symfony 4.

 

Figure 3 Drupal version support & Drupal 9 development timeline

 

Current Status

The major efforts will be directed towards removing the deprecated codes and updating third party dependencies to make Drupal 8 ready for Drupal 9. This also requires backward compatibility for all the modules – custom and contributed, developed for Drupal 8

 

o:spid="_x0000_i1025" type="#_x0000_t75" style='width:451.8pt;height:207pt;
visibility:visible;mso-wrap-style:square'>
o:title=""/>

Figure 4 Drupal 9 API

 

Upgrade from Drupal 8

Upgrading from Drupal 8 to Drupal 9 will be a matter of running update.php as long as your do not use deprecated APIs or third-party dependencies.

 

Upgrade from Drupal 7

Drupal 7 will be supported by Drupal community till November, 2020 and extended support by vendors will be available till 2024.

If you want to upgrade to Drupal 9, you will still need to take the route through Drupal 8. There are modules and resources available on Drupal.org that can help you to migrate your existing Drupal 7 site to Drupal 8.

Drupal 9 Drupal Drupal 8 Drupal Planet Do you like this? Share it! Subscribe to Drupal news from Joshi Consultancy Services Email Address I agree to the privacy policy
bhavinhjoshi

Drupal site accessibility

2 years 10 months ago
Drupal site accessibility bhavinhjoshi Mon, 10/07/2019 - 14:32
  • bhavinjoshi [at] joshics [dot] in ()target="_blank" rel="noopener external nofollow"
Drupal and accessibility

The Drupal websites should be designed in such a way that it can be accessed by persons with disabilities. In this post, we will focus on accessibility of your Drupal website.

Usually, this important point is overlooked during the web site design & development. An accessible website makes it universal and it is an essential aspect too.

Web accessibility supports social inclusion for people with disabilities as well as others, such as:

  • older people
  • people in rural areas
  • people in developing countries

 

You can improve content of your site by choosing correct structure, background and text colours and Link colours. You can test your website for accessibility over https://web.dev/measure or give a try to colours to check the contrast using https://webaim.org. These are free tools.

 

Contrast Checking

To pass WCGA 2 Level AA, it requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text, and a contrast ratio of at least 3:1 for graphics and user interface components (such as form input borders). Level AAA requires a contrast ratio of at least 7:1 for normal text and 4.5:1 for large text.

 

  Link Contrast checker

As the name suggest, you should use the link colours with higher contrast ration to text and background colours of your web page/site. With WebAim link contrast checker, you can calculate the best link colours for your existing colour theme.

 

Both links and body text must have at least 4.5:1 contrast with the background (3:1 for large text) to meet WCAG 2 Level AA.

 

There are few external tools available which you can use to determine the best colour contrast for your designs. With http://wave.webaim.org, you can check the overall accessibility of your site/pages

Drupal Drupal 8 Drupal 9 Drupal Planet Do you like this? Share it! Subscribe to Drupal news from Joshi Consultancy Services Email Address I agree to the privacy policy
bhavinhjoshi

Drupal 8 Migration Drush commands

2 years 10 months ago
Drupal 8 Migration Drush commands bhavinhjoshi Tue, 10/01/2019 - 13:50
  • bhavinjoshi [at] joshics [dot] in ()target="_blank" rel="noopener external nofollow"

Drupal 8 migration is always painful if not planned well. You run into 'Trial-and-error' and end up spending a more time than it is worth.

Here, there are drush commands which you can use during the migration process. Some of them are from contributed modules which help you during the migration. Drush commands from such modules will be indicated so.

Drupal 8 migration

As we know, migration follows Extract-Transform-Load (ETL) method to migrate the data to Drupal 8.

Here are the steps:

  • Extract is Source
  • Transform is processing and mapping the data
  • Load is setting/copying/saving the data to destination

 

Drush commands:

migrate-upgrade

Connects to the DB where you are migrating from. This command is useful when you are migrating from a Drupal 6 or Drupal 7 website. It takes following full form:

drush migrate-upgrade --legacy-db-url=mysql://user:pass@127.0.0.1/d6db --legacy-root=http://myd6site.com

You can also chose to migrate configurations only using

--configure-only drush migrate-upgrade --legacy-db-url=mysql://user:password@server/db --legacy-root=http://example.com --configure-only

If you your source DB has a prefix in table names, use 

--legacy-db-prefix

 

migrate-status

After creating the migration, this command will give you an overview of the migration that can take place.

 

migrate-import or mim or mi

With this command, you actually initiate the migration. You can then selectively import individual or multiple migrations using their names of import them all with

--all drush migrate-import --all drush mim

 

With Migrate Manifest module, you can create a group of migration and execute them at once:

drush migrate:template:list

This command gives you a list of available migration

Migration can be defined in a YAML file as below:

# nodes - d6_node - d6_node_revision - d6_node_type - d6_view_modes - d6_filter_format - d6_field_instance_per_form_display - d6_field_instance_widget_settings - d6_field_formatter_settings - d6_field_instance - d6_field - d6_field_settings - d6_node_settings - d6_cck_field_values:* - d6_cck_field_revision:* # taxonomy fields - d6_term_node_revision - d6_term_node - d6_vocabulary_entity_display - d6_vocabulary_entity_form_display - d6_vocabulary_field_instance - d6_vocabulary_field # blocks - d6_block - d6_menu # custom blocks - d6_custom_block - d6_filter_format # book - d6_book - d6_book_settings # file migrations are configurable - d6_file: source: conf_path: sites/assets destination: source_base_path: destination/base/path destination_path_property: uri

 

Save this file and place it a directory which can be accessed during the migration.

 

drush migrate-manifest --legacy-db-url=mysql://user:pass@localhost/drupal_6 manifest.yml

 

For better control, you can place this YAML file in version control to track the changes.

 

drush migrate-rollback

When you have issues with migration or just testing your migration, you can always rollback them!

drush mr --group=files

 

migrate-stop

You can stop an active migration using this command

drush migrate-stop

 

migrate-messages

This command allows you to view messages associated with a migration to debug the process so you can identify the issue and correct it.

drush migrate-messages

 

migrate-reset-status

Reset status of an active migration to idle and start over.

drush migrate-reset-status Need Help? Drupal 8 Drupal Drupal Planet Do you like this? Share it! Subscribe to Drupal news from Joshi Consultancy Services Email Address I agree to the privacy policy
bhavinhjoshi

Updating Drupal 8 Core

3 years 1 month ago
Updating Drupal 8 Core bhavinhjoshi Mon, 07/01/2019 - 12:00
  • bhavinjoshi [at] joshics [dot] in ()target="_blank" rel="noopener external nofollow"

If you are running an old version of Drupal 8, it is likely that your site can be compromised by the known vulnerabilities. And to guard your site against possible hacks, you should update Drupal core to latest stable release in 8.x branch.

 

 

Updating Drupal 8 core

There are two ways to update Drupal 8 core:

1. Manually

2. Using composer

Below, we will learn how to use these methods to update Drupal 8 core.

 

1. Manually updating Drupal 8 core

If you are not using or managing your Drupal 8 website using composer, here are the steps to update your Drupal 8 core:

  • Tack backup of your site, both codebase and the Database. Download latest release of Drupal 8 core.
  • Copy all the files and directories from downloaded version except 'sites' and 'modules'. We assume you did not make changes to any core modules or themes. If you need to, take a backup of .htaccess and 'profiles' directory as well.
  • Overwrite your site codebase with copied files and directories.
  • Restore all the files that you previously modified.
  • Perform DB update and composer update.
  • At this stage, do not perform an update to contrib modules. Contrib module updates are not consistent and you can not rely on them to be act so. This is very efficient method when you did not alter any core or contrib module/theme files.

 

2. Using Composer

You can also update your Drupal 8 website using composer. This is most convenient way to update Drupal 8 website. You must have SSH access to sever in order to carry out the composer commands and update Drupal 8 core.

  • Execute composer update
  • Once done, execute drush updb
  • For consistency and to make sure everything is in order, execute drush cr

Congratulations! You have just updated your Drupal 8 website!!

Drupal Drupal 8 Drupal Planet Do you like this? Share it! Subscribe to Drupal news from Joshi Consultancy Services Email Address I agree to the privacy policy
bhavinhjoshi
Checked
3 hours 17 minutes ago
Subscribe to JCS Blog feed