DEVSUP assessment helper: where to find each answer

Before you start

  • "Not sure" is always an acceptable answer. We follow up on every submission, so don't let one question stop you.
  • You need to be able to log in to your site as an administrator.
  • Find your Drupal version first, then select the link that matches it:
    • Drupal 7: log in and go to Reports > Status report. The version is on the first line.
    • Drupal 8 and later: log in and go to Reports > Status report. The version is in the box at the top.
  • Drupal upgrade assessment form asks a few questions about your site that you may not know off the top of your head. The links below show you where/how to find each answer according to the version of Drupal you are running now.
  • You can always reach out with questions: gwendolyn@anelloconsulting.com.

Use the assessment helper for your version of Drupal core

Some general questions can only be answered by you, or by someone with access to your server. Those are covered below in the General questions help and Advanced (for developers and site maintainers) help sections.  

General questions help

  • Where is the site hosted? This is the company you pay to keep the site online. Check your invoices, or ask whoever maintains the site.
  • Does your site have a remote development environment? This is a second, private copy of your site used for testing changes before they go live. It is often called "dev", "test", or "staging". 
  • Does your site integrate with any external systems? Anything your site sends information to or receives it from: a CRM, a payment processor, an email marketing service, a membership database, single sign-on, and so on.
  • What does your site use for search? If the search box on your site is powered by Google, Algolia, or another outside service, choose Something else.
  • Decoupled/headless front end? Tick this only if the pages your visitors see are built by a separate application (for example React or Next.js) that pulls its content from Drupal. If you have never heard the term, it almost certainly doesn't apply.

Advanced (for developers and site maintainers) help

These commands answer additional questions that the Drupal version-specific instructions cannot. They need command-line access to the site's code and use only standard tools. Run them from the project root (the folder that contains composer.json on Drupal 8 and later, or index.php on Drupal 7).

The paths below are the conventional ones. Adjust them if your site uses docroot in place of web, or keeps custom code somewhere else.

Is the code in a Git repository?

git rev-parse --is-inside-work-tree   # prints "true" if it is
git remote -v                         # shows where the repository is hosted

Lines of custom module code

Assumes custom modules are located in a web/modules/custom/ directory, adjust as necessary.

Drupal 8 and later:

find web/modules/custom -type f \
  \( -name '*.php' -o -name '*.module' -o -name '*.inc' -o -name '*.install' \
     -o -name '*.theme' -o -name '*.twig' -o -name '*.js' -o -name '*.yml' \) \
  -not -path '*/node_modules/*' -not -path '*/vendor/*' -print0 | xargs -0 cat | wc -l

Drupal 7:

find sites/all/modules/custom -type f \
  \( -name '*.php' -o -name '*.module' -o -name '*.inc' -o -name '*.install' \
     -o -name '*.js' -o -name '*.info' \) \
  -not -path '*/node_modules/*' -print0 | xargs -0 cat | wc -l

On Drupal 7, custom modules are sometimes mixed in with contributed ones in sites/all/modules. If there is no custom folder, run the command against each custom module's folder and add the results.

Lines of custom theme code

Assumes custom themes are located in a web/themes/custom/ directory, adjust as necessary.

Drupal 8 and later:

find web/themes/custom -type f \
  \( -name '*.twig' -o -name '*.theme' -o -name '*.php' -o -name '*.js' \
     -o -name '*.css' -o -name '*.scss' -o -name '*.yml' \) \
  -not -path '*/node_modules/*' -not -path '*/dist/*' -not -path '*/build/*' \
  -not -name '*.min.*' -print0 | xargs -0 cat | wc -l

Drupal 7:

find sites/all/themes -type f \
  \( -name '*.php' -o -name '*.inc' -o -name '*.js' -o -name '*.css' \
     -o -name '*.scss' -o -name '*.info' \) \
  -not -path '*/node_modules/*' -not -path '*/dist/*' -not -path '*/build/*' \
  -not -name '*.min.*' -print0 | xargs -0 cat | wc -l

If the theme compiles Sass into CSS, remove the -o -name '*.css' part so the same styles aren't counted twice. On Drupal 7, point the command at your custom theme's folder if sites/all/themes also holds contributed themes.

These are raw line counts, including blank lines and comments. That is accurate enough for the ranges on the form.

Size of the files directory

du -sh web/sites/default/files    # Drupal 8 and later
du -sh sites/default/files        # Drupal 7

Run this on the live server, since a local copy of the code often has no files in it. On managed hosts such as Pantheon or Acquia, the hosting dashboard usually shows this number.

Number of patches

Drupal 8 and later, for patches listed in composer.json:

php -r '$c = json_decode(file_get_contents("composer.json"), true); $n = 0; foreach (($c["extra"]["patches"] ?? []) as $p) { $n += count($p); } echo $n, "\n";'

If composer.json has an extra.patches-file entry, run the same command with that file's name in place of composer.json.

Any version, as a cross-check (each PATCHES.txt marks one patched project and lists its patches):

find . -name PATCHES.txt -not -path '*/node_modules/*'

Number of enabled contributed modules

drush pm:list --status=enabled --type=module --no-core --format=list | wc -l   # Drupal 8 and later
drush pml --status=enabled --type=module --no-core --pipe | wc -l              # Drupal 7

This count includes custom modules, so subtract those.

Number of content entities

Useful on Drupal 8 to 9.3, where no report gives a total:

drush sql:query "SELECT COUNT(*) FROM node"
drush sql:query "SELECT COUNT(*) FROM users"
drush sql:query "SELECT COUNT(*) FROM taxonomy_term_data"

On Drupal 7, use drush sqlq in place of drush sql:query. Add the three numbers together.

Modules with no Drupal 11 upgrade path (Drupal 10 only)

composer why-not drupal/core 11.0.0

This lists every installed package that blocks an update to Drupal 11. Count the contributed modules and themes in the output.

Is the site a multisite?

ls -d web/sites/*/settings.php    # Drupal 8 and later
ls -d sites/*/settings.php        # Drupal 7

More than one result means the codebase runs more than one site.

Still stuck on a question? Choose Not sure and submit the form anyway. A real person reviews every assessment and will follow up with you.