diff --git a/file_entity.install b/file_entity.install
index 78097d6..ffa0c56 100644
--- a/file_entity.install
+++ b/file_entity.install
@@ -198,3 +198,24 @@ function file_entity_update_8005() {
     \Drupal::entityDefinitionUpdateManager()->updateEntityType($entity_type);
   }
 }
+
+/**
+ * Update pathauto to enable path field for file entity type if there are
+ * file aliases or patterns.
+ */
+function file_entity_update_8201() {
+  if (\Drupal::moduleHandler()->moduleExists('pathauto')) {
+    $file_patterns = \Drupal::entityTypeManager()->getStorage('pathauto_pattern')->loadByProperties(['type' => 'canonical_entities:file']);
+    $file_aliases = \Drupal::entityTypeManager()->getStorage('path_alias')->getQuery()->condition('path', '/file/%', 'LIKE')->accessCheck(FALSE)->count()->execute();
+    if (!empty($file_patterns) || $file_aliases > 0) {
+      $config_factory = \Drupal::configFactory();
+      $config = $config_factory->getEditable('pathauto.settings');
+      $enabled_entity_types = $config->get('enabled_entity_types');
+      $config->set('enabled_entity_types', array_unique(array_merge($enabled_entity_types, ['file'])));
+      $config->save();
+    }
+    else {
+      \Drupal::messenger()->addMessage(t("Files no longer have an alias field by default, enable it in the pathauto settings if you wish to use that."));
+    }
+  }
+}
diff --git a/file_entity.module b/file_entity.module
index 7e62a23..165bc5e 100644
--- a/file_entity.module
+++ b/file_entity.module
@@ -320,33 +320,6 @@ function file_entity_file_download($uri) {
   return -1;
 }
 
-/**
- * @name pathauto_file Pathauto integration for the core file module.
- * @{
- */
-
-/**
- * Implements hook_entity_base_field_info().
- */
-function file_entity_entity_base_field_info(EntityTypeInterface $entity_type) {
-  // @todo: Make this configurable and/or remove if
-  //   https://drupal.org/node/476294 is resolved.
-  if (\Drupal::moduleHandler()->moduleExists('pathauto') && $entity_type->id() == 'file') {
-    $fields = array();
-    $fields['path'] = BaseFieldDefinition::create('path')
-      ->setCustomStorage(TRUE)
-      ->setLabel(t('URL alias'))
-      ->setTranslatable(TRUE)
-      ->setProvider('file_entity')
-      ->setDisplayOptions('form', array(
-        'type' => 'path',
-        'weight' => 30,
-      ))
-      ->setDisplayConfigurable('form', TRUE);
-    return $fields;
-  }
-}
-
 /**
  * @} End of "name pathauto_file".
  */
diff --git a/tests/src/Functional/FileEntityPathautoTest.php b/tests/src/Functional/FileEntityPathautoTest.php
index 0e89d3c..a8b3e7e 100644
--- a/tests/src/Functional/FileEntityPathautoTest.php
+++ b/tests/src/Functional/FileEntityPathautoTest.php
@@ -27,6 +27,13 @@ class FileEntityPathautoTest extends FileEntityTestBase {
    * Tests Pathauto support.
    */
   public function testPathauto() {
+    $this->config('pathauto.settings')
+      ->set('enabled_entity_types', ['file'])
+      ->save();
+
+    \Drupal::service('entity_field.manager')->clearCachedFieldDefinitions();
+    \Drupal::service('plugin.manager.alias_type')->clearCachedDefinitions();
+
     $pattern = PathautoPattern::create([
       'id' => mb_strtolower($this->randomMachineName()),
       'type' => 'canonical_entities:file',
