I got this error after migrating from Drupal 6 to Drupal 8.1.3.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "php" plugin does not exist. in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 52 of core\lib\Drupal\Component\Plugin\Discovery\DiscoveryTrait.php).

How can I fix this error?

  • have you checked log files on the server? Commented Jul 14, 2016 at 10:46
  • that's exactly what the log say. it also display that same message on my web page.
    – Gabriel
    Commented Jul 14, 2016 at 10:51
  • it is on all pages? have you got blank page with this error? Commented Jul 14, 2016 at 10:52
  • that shows me in the user/login page only. Front end shows site under maintenance.
    – Gabriel
    Commented Jul 14, 2016 at 10:57
  • This most likely shows up when viewing content that is configured to display a text format that had php plugin enabled previously. I needed to re-save all of my text formats after migrating from Drupal 6 to Drupal 8.
    – mradcliffe
    Commented Jul 14, 2016 at 11:17

2 Answers 2


It's a guess, but the php module was removed from core in D8 and is now supplied by a contrib module: PHP

You will need to install it additionally.

Edit 1:

If you don't intend to use the module in the future, enable it only temporarily, find alternatives for the fields/text formates currently using it (if needed, the filter may be available but not actually used for php) then uninstall it again once you are done.

  • is there anyway that i can removed this module entry/reference from database directly?
    – Gabriel
    Commented Jul 14, 2016 at 11:05
  • Not that I am aware of. Personally I would enable it, find all places were the php filter was enabled/used find an alternative that works for your purpose and uninstall php module again.
    – Zuzuesque
    Commented Jul 14, 2016 at 11:36
  • unfortunately, I can't access admin page anymore as i got that error message on user/login
    – Gabriel
    Commented Jul 14, 2016 at 11:47
  • While I don't know how to remove the php options from fields in the db, you can try to enable the php module manually in the db: drupal.org/node/157632
    – Zuzuesque
    Commented Jul 14, 2016 at 11:54

Do these actions in your database :

  1. Locate php_code in 'node_revision_body' table at 'body_format' column, and change it from 'php_code' to 'filtered_html'.

  2. There is also 'filter.format.php_code' in my config table, i delete that.

  3. drush cr.

  4. Enable 'php' module from drush using the command 'drush pm-enable php'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.