How to update the URL Redirect module v1.4 to its latest version without losing redirects? When I last went to update the URL redirect module from 8.x-1.4 to its latest version I saw this note:


  After 8.x-1.4 version URL Redirect changed as config entity. If you are using before 8.x-1.4 version, it's strongly recommended to not upgrade module as it deletes all existing redirects in your system.


Since I didn't want to lose all my redirects, I just left the module as it was.  Unfortunately, as of yesterday, v8.x-1.4 is no longer supported.

What is the best fix for updating this module?
Is it just a matter of updating to v8.x-2.3 and redoing the redirects (fortunately I do not have a lot of redirects) or is there an easier way of doing it?
You can update module to v8.x-2.3 and run drush updb or update.php. In 8.x-2.3 version all existing redirects get converted to an entity in an update hook.

/**
 * Migrate old redirect data.
 */
function url_redirect_update_8103() {

  $db_connection = \Drupal::database();

  if ($db_connection-&gt;schema()-&gt;tableExists('url_redirect')) {
    $query = $db_connection-&gt;select('url_redirect', 'ur');
    $query-&gt;fields('ur');
    $all_data = $query-&gt;execute()-&gt;fetchAll();

    foreach ($all_data as $key =&gt; $data) {
      $values = array(
          'label' =&gt; 'Migrated Redirect',
          'id' =&gt; 'migrated_' . $key . '_' . time(),
          'path' =&gt; $data-&gt;path,
          'redirect_path' =&gt; $data-&gt;redirect_path,
          'roles' =&gt; Drupal\Component\Serialization\Json::decode($data-&gt;roles),
          'users' =&gt; Drupal\Component\Serialization\Json::decode($data-&gt;users),
          'status' =&gt; $data-&gt;status,
          'message' =&gt; $data-&gt;message,
          'checked_for' =&gt; $data-&gt;check_for,
      );
      $url_redirect_entity = \Drupal\url_redirect\Entity\UrlRedirect::create($values);
      $url_redirect_entity-&gt;save();
    }

    // We can drop 'url_redirect' table once we confirm everything is migrated properly.
    // $db_connection-&gt;schema()-&gt;dropTable('url_redirect');
  }
}