diff --git a/core/lib/Drupal/Core/Config/ConfigFactory.php b/core/lib/Drupal/Core/Config/ConfigFactory.php
index e43a36c1f1..c20972a486 100644
--- a/core/lib/Drupal/Core/Config/ConfigFactory.php
+++ b/core/lib/Drupal/Core/Config/ConfigFactory.php
@@ -250,7 +250,8 @@ public function reset($name = NULL) {
    * {@inheritdoc}
    */
   public function rename($old_name, $new_name) {
-    Cache::invalidateTags($this->get($old_name)->getCacheTags());
+    $old_config = $this->get($old_name);
+    Cache::invalidateTags($old_config->getCacheTags());
     $this->storage->rename($old_name, $new_name);
 
     // Clear out the static cache of any references to the old name.
@@ -260,7 +261,7 @@ public function rename($old_name, $new_name) {
 
     // Prime the cache and load the configuration with the correct overrides.
     $config = $this->get($new_name);
-    $this->eventDispatcher->dispatch(ConfigEvents::RENAME, new ConfigRenameEvent($config, $old_name));
+    $this->eventDispatcher->dispatch(ConfigEvents::RENAME, new ConfigRenameEvent($config, $old_name, $old_config));
     return $this;
   }
 
diff --git a/core/lib/Drupal/Core/Config/ConfigRenameEvent.php b/core/lib/Drupal/Core/Config/ConfigRenameEvent.php
index 8f71559809..5e6a6561c6 100644
--- a/core/lib/Drupal/Core/Config/ConfigRenameEvent.php
+++ b/core/lib/Drupal/Core/Config/ConfigRenameEvent.php
@@ -14,6 +14,13 @@ class ConfigRenameEvent extends ConfigCrudEvent {
    */
   protected $oldName;
 
+  /**
+   * Configuration object before it has been renamed.
+   *
+   * @var \Drupal\Core\Config\Config
+   */
+  protected $oldConfig;
+
   /**
    * Constructs the config rename event.
    *
@@ -21,10 +28,13 @@ class ConfigRenameEvent extends ConfigCrudEvent {
    *   The configuration that has been renamed.
    * @param string $old_name
    *   The old configuration object name.
+   * @param \Drupal\Core\Config\Config $old_config
+   *   (optional) The configuration before it has been renamed.
    */
-  public function __construct(Config $config, $old_name) {
-    $this->config = $config;
+  public function __construct(Config $config, $old_name, $old_config = NULL) {
+    parent::__construct($config);
     $this->oldName = $old_name;
+    $this->oldConfig = $old_config;
   }
 
   /**
@@ -37,4 +47,14 @@ public function getOldName() {
     return $this->oldName;
   }
 
+  /**
+   * Gets the old configuration object.
+   *
+   * @return \Drupal\Core\Config\Config
+   *   The configuration object the renaming of which caused the event to fire.
+   */
+  public function getOldConfig() {
+    return $this->oldConfig;
+  }
+
 }
diff --git a/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php b/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php
index cc968825ad..115210c34b 100644
--- a/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php
+++ b/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php
@@ -7,6 +7,7 @@
 use Drupal\Core\Config\ConfigEvents;
 use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Config\ConfigManagerInterface;
+use Drupal\Core\Config\ConfigRenameEvent;
 use Drupal\Core\Config\Entity\ConfigEntityTypeInterface;
 use Drupal\Core\Entity\EntityTypeInterface;
 use Drupal\Core\Entity\Query\QueryBase;
@@ -231,6 +232,26 @@ public function onConfigSave(ConfigCrudEvent $event) {
     }
   }
 
+  /**
+   * Updates configuration entity in the key store.
+   *
+   * @param \Drupal\Core\Config\ConfigRenameEvent $event
+   *   The configuration event.
+   */
+  public function onConfigRename(ConfigRenameEvent $event) {
+    $saved_config = $event->getConfig();
+    $entity_type_id = $this->configManager->getEntityTypeIdByName($saved_config->getName());
+    if ($entity_type_id) {
+      $entity_type = $this->configManager->getEntityManager()->getDefinition($entity_type_id);
+      // Delete the config key store for the old config.
+      if ($old_config = $event->getOldConfig()) {
+        $this->deleteConfigKeyStore($entity_type, $old_config);
+      }
+      // Update the config key store for the new config.
+      $this->updateConfigKeyStore($entity_type, $saved_config);
+    }
+  }
+
   /**
    * Removes configuration entity from key store.
    *
@@ -251,6 +272,7 @@ public function onConfigDelete(ConfigCrudEvent $event) {
    */
   public static function getSubscribedEvents() {
     $events[ConfigEvents::SAVE][] = ['onConfigSave', 128];
+    $events[ConfigEvents::RENAME][] = ['onConfigRename', 128];
     $events[ConfigEvents::DELETE][] = ['onConfigDelete', 128];
     return $events;
   }
diff --git a/core/modules/system/system.post_update.php b/core/modules/system/system.post_update.php
index 66fa24aa16..894e4d408d 100644
--- a/core/modules/system/system.post_update.php
+++ b/core/modules/system/system.post_update.php
@@ -5,6 +5,7 @@
  * Post update functions for System.
  */
 
+use Drupal\Core\Config\Entity\ConfigEntityTypeInterface;
 use Drupal\Core\Entity\Display\EntityDisplayInterface;
 use Drupal\Core\Entity\Entity\EntityFormDisplay;
 use Drupal\Core\Entity\Entity\EntityViewDisplay;
@@ -130,3 +131,28 @@ function system_post_update_change_delete_action_plugins() {
     }
   }
 }
+
+/**
+ * Re-saves config entities that cannot be loaded by uuid.
+ *
+ * By re-saving the entities that cannot be loaded by uuid the config key store
+ * for fast lookups will be updated, which will make the entities loadable by
+ * uuid.
+ */
+function system_post_update_resave_non_loadable_config_entities() {
+  $entity_type_manager = \Drupal::entityTypeManager();
+  /** @var \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository */
+  $entity_repository = \Drupal::service('entity.repository');
+  $entity_types = $entity_type_manager->getDefinitions();
+  foreach ($entity_types as $entity_type_id => $entity_type) {
+    if ($entity_type instanceof ConfigEntityTypeInterface) {
+      $entities = $entity_type_manager->getStorage($entity_type_id)->loadMultiple();
+      foreach ($entities as $entity) {
+        $entity_by_uuid = $entity_repository->loadEntityByUuid($entity_type_id, $entity->uuid());
+        if (is_null($entity_by_uuid)) {
+          $entity->save();
+        }
+      }
+    }
+  }
+}
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
index 8dc101a465..655338ebaa 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
@@ -109,6 +109,31 @@ protected function setUp() {
     $entity->save();
   }
 
+  /**
+   * Tests loading config entity by UUID after it has been renamed.
+   */
+  public function testLoadByUuidAfterRename() {
+    /** @var \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository */
+    $entity_repository = \Drupal::service('entity.repository');
+    $config_factory = \Drupal::configFactory();
+
+    /** @var \Drupal\config_test\Entity\ConfigQueryTest $entity */
+    $entity = reset($this->entities);
+    $config_test_id = $entity->id();
+
+    // Ensure that the entity is loaded by its uuid.
+    $entity_loaded_by_uuid = $entity_repository->loadEntityByUuid($entity->getEntityTypeId(), $entity->uuid());
+    $this->assertEquals($config_test_id, $entity_loaded_by_uuid->id());
+
+    // Rename the entity and ensure that it still can be loaded by its uuid.
+    $config_name = $entity->getEntityType()->getConfigPrefix() . '.' . $entity->id();
+    $config_factory->rename($config_name, $config_name . '_test');
+
+    $entity_loaded_by_uuid = $entity_repository->loadEntityByUuid($entity->getEntityTypeId(), $entity->uuid());
+    $this->assertNotNull($entity_loaded_by_uuid);
+    $this->assertEquals($config_test_id, $entity_loaded_by_uuid->id());
+  }
+
   /**
    * Tests basic functionality.
    */
