Last updated September 29, 2016. Created on October 19, 2013.
Edited by KeyboardCowboy, webchick, xjm. Log in to edit this page.

Before we begin replacing any code, we need to convert the module's .info file to a YAML file so Drupal 8 will recognize it. The easiest way to do this is by appending .yml to your .info file and converting the .info syntax to YAML syntax.

The change record provides a comprehensive overview for how to do this.

Once you've converted your .info file we'll check the extensions page in your website to make sure Drupal 8 successfully recognizes your module.

1. Rename your .info file

D7: mymodule.info
D8: mymodule.info.yml

2. Convert your .info file to YAML

The structure is very similar, but there are a few differences. Here is an overview.

Drupal 7: mymodule.info
------------------------------
name = My D7 Module
description = This module needs to be ported to D8.
core = 7.x
version = VERSION
package = Custom Modules

configure = admin/config/user-interface/your-module

dependencies[] = ctools
dependencies[] = panels
dependencies[] = views

files[] = lib/FozzieClass.php
files[] = lib/GonzoClass.php
files[] = lib/KermitClass.php

------------------------------
Drupal 8: yourmodule.info.yml
------------------------------
name: 'My D7 Module'
description: 'This module needs to be ported to D8.''
core: 8.x
version: VERSION
package: 'Custom Modules'

configure = my_module.admin

dependencies:
  - ctools
  - panels
  - views

# Files are no longer listed in an .info file.

The change record to convert your .info file contains the full spec.

Check the Extensions Page

If you visit your Drupal 8 module administration page at admin/modules, your module should now be listed.

3. Enable your module

Once you've converted the file, reload admin/modules. You can use the new search field to locate your module:

Debugging .info.yml files

If the module is not listed correctly or cannot be enabled, see the troubleshooting tips for debugging .info.yml files.

Enable your module and start debugging!

Now, enable the module and see what happens! If you get a fatal error or white screen of death, try some of the common debugging techniques.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.