diff --git a/core/includes/form.inc b/core/includes/form.inc
index 6956f04..a53cf24 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -4354,8 +4354,7 @@ function form_process_weight($element) {
   $element['#is_weight'] = TRUE;

   // If the number of options is small enough, use a select field.
-  $max_elements = variable_get('drupal_weight_select_max', DRUPAL_WEIGHT_SELECT_MAX);
-  if ($element['#delta'] <= $max_elements) {
+  if ($element['#delta'] <= config('system.site')->get('weight_select_max')) {
     $element['#type'] = 'select';
     for ($n = (-1 * $element['#delta']); $n <= $element['#delta']; $n++) {
       $weights[$n] = $n;
diff --git a/core/modules/system/config/system.site.yml b/core/modules/system/config/system.site.yml
index 010dedf..47e14f8 100644
--- a/core/modules/system/config/system.site.yml
+++ b/core/modules/system/config/system.site.yml
@@ -5,3 +5,4 @@ page:
   403: ''
   404: ''
   front: user
+weight_select_max: '100'
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 388ced8..008eb5c 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -2228,6 +2228,18 @@ function system_update_8033() {
 }

 /**
+ * Coverts drupal_weight_select_max variable to config.
+ *
+ * @ingroup config_upgrade
+ */
+function system_update_8034() {
+  $variable_map = array(
+    'drupal_weight_select_max' => 'weight_select_max',
+  );
+  update_variables_to_config('system.site', $variable_map);
+}
+
+/**
  * @} End of "defgroup updates-7.x-to-8.x".
  * The next series of updates should start at 9000.
  */
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 7f9f33a..9f85670 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -47,13 +47,6 @@
 const DRUPAL_REQUIRED = 2;

 /**
- * Maximum number of values in a weight select element.
- *
- * If the number of values is over the maximum, a text field is used instead.
- */
-const DRUPAL_WEIGHT_SELECT_MAX = 100;
-
-/**
  * Return only visible regions.
  *
  * @see system_region_list()
