I trust that you found this blog post to be enjoyable. If you are interested in having my team handle your eCommerce setup and marketing for you, Contact Us Click here.

How to upgrade Drupal 8 to Drupal 10

How to upgrade Drupal 8 to Drupal 10

Drupal 10 was released in late 2022. The developers promised the  new version to be saver and more convenient for the users, but you will not be able to prove this until you upgrade the old version of  Drupal CMS that your websites is currentlt running on. 

Generally, migration is the processof moving data from one source  to another. In the case of Drupal, there is a source database and the database to which this data must be transferred. 

  • Data Acquisition :- A query system allow data to be  retrieved from the source database. 
  • Mapping :- At this stage, you need to define which field of  the source base need to be transferred to which field of the  target base. 
  • Processing :- This operation allows us to modify the data  retrieved from the source database. 
  • Settings :- Setting is the task of the part of the target object  that inserts that data into the structure of the Drupal 10  database. 

    Migrating from Drupal 8 to Drupal 10 

    Drupal 8 has a code that is critically different from that of Drupal 9  and 10, which is why it is most difficult to migrate to the latest  version. When the Drupal was created, the developers completely  overhauled drupal’s internal system: the symphony components  were integrated and since then the release of new CMS version has been tied to the framework’s release. 

    Step 1: Back up of your Drupal website. 

    • Backup your Drupal8 and database. 
    • Go to the Drupal8 admin panel.
    • Click on Drupal8 admin menu “configuration”. 
    • Then Configuration -> Development -> Backup and  migrate
      ptiwebtech_website
      • Then click on Backup and migrate. 
      • Go to that page and get backup of your particular  website. 
        ptiwebtech_website
        • Check the requirments for the Drupal 10 which this  include PHP version, database version, and other server  configuration.
        • Update all the contributed modules and themes to their  latest Drupal8 compatible version using composer. 

        Step 2 : Upgrade to the latest Drupal 8 version

        • Go to the Terminal or Command prompt. 
        • Set the drupal8 directory path into the terminal or  command prompt.

        Type

        • cd var/www/html/drupal8 
        • Update the latest minor release of Drupal 8. 
          ptiwebtech_website
          • After these commands ‘composer update’ command is  also hit into the terminal or command prompt. 
          ptiwebtech_website

          Step 3: Update the database. 

          • Then into the terminal or command prompt run database  update command. 
          • Through drush.
          • After hit database update command then run the cache  clean command. 
          ptiwebtech_website

          Step 4: Then Upgrade Drupal 9 latest version.

          • Go to google and search Drupal 9 latest version. 
          • Download the latest version of Drupal9. 
          • Then open terminal and command prompt. 

          Type

            ptiwebtech_website
            • Then type the command for the Database update
            ptiwebtech_website
            • After then type the command for cache clean.
            ptiwebtech_website

            Step 5: Upgrade your Drupal 9 Modules and Themes. 

            • Open the terminal or command prompt. 
            • Run the command for update the composer. 
            ptiwebtech_website
            • Run the command for the database update or clear  cache. 
            ptiwebtech_website

            Step 6: Prepare your Drupal 9 site to upgrade  into the Drupal 10. 

            • Install and enable the upgrade status module in your Drupal 8. 
              ptiwebtech_website
              • If you conflict with the “phpstan-drupal”
              • Then open the terminal or command prompt and run the particular command. 

              Command :- composer require drupal/upgrade_status  mglaman/phpstan-drupal:^1.0 phpstan/phpstan:^1.0  phpstan/phpstan-deprecation-rules:^1.0 -W”.

              • Go to the Drupal admin panel. 
              • Admin -> Reports > Upgrade-status 
              • You will need to ensure that the host support PHP  8.1. 
              • Change your PHP version to 8.1. 
              ptiwebtech_website

              Note : There may be custom module in this list that you need to  remove from the file system manually , as they won’t be in  composer.json. I’ve seen the scan the error out but if you go back to the  upgrade status page, everything is there. So if you get an error , check  the upgrade status page to see if you have what you need anyway. 

              You will probably see a lot of custom module with “1 warning” and it looking like this if you click on “1  warning”. 

              Type in command prompt :- “Add core_version_requirement:  ^9 || ^10 to designate that the module is compatible with Drupal  10. See https://drupal.org/node/3070687.” 

              ptiwebtech_website

              Step 7: Upgarde Drupal 10 after the Drupal 9 setup. 

              • Use ‘upgarde status’ module to check for Drupal 10  compatibility.
              • Download the drupal 10 latest version from drupal.org. • Then go to the terminal or command prompt. 

              Type

                ptiwebtech_website
                • Update Contributed module and themes according to your Drupal 10. 
                • Ensure all contributed module and theme are compatible  with Drupal 10. 

                  Step 8: Upgrade core Drupal 10. 

                  • Go to the terminal or command prompt for upgrading the  Drupal 10. 
                    ptiwebtech_website
                    • Now to update the module and theme. 
                    • Now at last command we hit to Run the database update.
                      Back to blog