Main Menu

search

You are here

Drupal: Update from 7.73 to 7.99

[last updated: 2023-12-29]
Drupal home page
see Reference Links below...
-----

  • This page documents my process of updating from 7.73 to 7.99.
    These steps were extracted from several places, mostly drupal.org, starting at: https://www.drupal.org/docs/7/update/

  • This process assumes:
    All customization for your site has been done in the [root] /sites directory, which this process does not affect.
    ----------------------------------------------

  • Follow These Steps:
    • 1. Prepare:
      • Find your current installed Drupal version:
        Open a browser to your website, log in
        Reports (top menu bar) --> Status Report
        top line will show current Drupal version
          I'm at 7.73
      • Decide what version you will update to:
          I'll be updating to 7.99
      • Get your new version:
        Choose to download zip file
          Notes for future updates, but not relevant for this one:
          Optional method: Unzip the file on your local PC. (or, optional see below...)
          Delete the /sites folder in your unzipped new version. (You'll be replacing this with the one you saved from your existing site.)
          If you have customized any other files, eg. robots.txt or .htaccess, delete them from the new version as well.

      • Review the Release Notes for your new version:
        They will tell you if you need to do anything special to accommodate your site to the new version
          (link to:) drupal.org.
          At bottom of the project page under the "Downloads" section, use the link for your version of Drupal to view the release notes.
          If your version is not listed, use the "View all releases" link.
          No accommodations needed for this rev. for my site.

      • Review tutorials and websites:
        define the specific procedure you will use for your situation and preferences.

      • Update D-7 modules:
        https://www.drupal.org/docs/7/update/updating-modules
        (this page also has links to drush and composer modules, which are tools for updating modules)
          I don't have any contributed modules installed, other than adsense, which I'll be deleting.

      • Examine [root]/sites/default/settings.php
        record your database name, user name, and user password.
          done

      • Make sure your host supports everything needed:
        https://www.drupal.org/docs/7/system-requirements
        appears I need to upgrade php from current 7.4.33 to 8.2
        see note here: https://www.drupal.org/docs/7/system-requirements/php-requirements-for-d...
        regarding file permissions needed by php

    • 2. Backup files, directories, and Database:

    • 3. Update core files:
      • I'll be doing things slightly differently than steps on drupal site...

      • Open file manager on your host:
        log in to BlueHost.com
        Scroll down to Helpful Links > Advanced, and select File Manager

      • select account folder in left sidebar: /home2/arduinoe
        click "+Folder" (near left side in upper menu bar)
        enter name for new folder: public_html_new
        leave new folder location field blank (default will be home directory)

      • upload the zipped drupal 7.99 core file into the new folder

      • extract the zipped core file
          This will create a new folder, "drupal-7.99" (which is the name I used for the zip file.)
          All the extracted files will be in this folder.
          However I want the files to be in the "root" folder, "public_html_new", so I moved them and deleted the drupal-7.99 folder (now empty).

      • Make sure the new directory has the same permissions as the original:
        examine far-right permissions column in FM
        • Change permissions:
          • select file in FM
          • permissions for a file or directory are listed to the far right of the listing.
            eg. the default directory has permissions: 0555.
            the default/files directory has permissions: 0755
            the default/...php files have permissions: 0644
            none of these can be deleted directly (see above to change permissions)
          • right-click, select Change Permissions (or click in menu bar above)
            change to 0755 or higher
          • the trick: you must do the same for parent directories

      • delete /sites from the unzipped core file (in public_html_new):
        you can directly delete most of the files in the /sites directory, but not all of them.
        you must change permissions in order to delete the "default" directory.

      • Copy the /sites folder from public_html to public_html_new.

      • Prepare settings.php:
        NOT SURE ABOUT THIS ...

        BUT: since entire settings.php file has been copied from orig to new root,
        I'm assuming none of this is needed...

          open settings.php:
          double-click its icon
          open with text editor, OK
          instructions say to "remove all content"
          guessing I should retain first line: save it
          would not let me, read-only
          changed permissions and got it done

        --------------------------------------------------------------

      • Preparation is done, do it:

      • Put site into Maintenance Mode:
          Open browser to site (arduinoetal.net), and log in with Admin privileges
          In the upper menu bar, select Configuration > Development > Maintenance mode.
          Click "Put site into maintenance mode" checkbox.
          Click on "Save configuration".
      • Navigate to root directory (public_html).
        rename public_html to public_html_old
      • rename public_html_new to public_html

      • run update.php:
        open a browser and enter [yourSiteName]/update.php. (arduinoetal.net/update.php in my case...)
        The update will prompt you for other info.
        Be sure you know your database username and password before starting.
          however since I only have one db, it didn't prompt me for anything...

      • turn off maintenance mode:
          (reverse of procedure to enter maintenance mode:)
          Open browser to site (arduinoetal.net), and log in with Admin privileges
          In the upper menu bar, select Configuration > Development > Maintenance mode.
          Un-check "Put site into maintenance mode" checkbox.
          Click on "Save configuration".

      • Test:
          On previous update,
          I had to: Find Content, select all, publish selected content, update ... in order to see my pages.
          However this update worked without error first time.

      • delete all files and folders from your orig (now public_html_old) root installation directory:

  • 5. Update the modules (link to: module update instructions)
    If you have installed any modules, ie. modules that are not part of the default module set, then you must update them to be compatible with your new drupal version.
    For my site, the only one is: sites/all/modules/simple_adsense
    ----------------------------------------------------------

  • Reference Links:

eof