diff --git a/tests/phpunit/tests/multisite/wpmuLogNewRegistrations.php b/tests/phpunit/tests/multisite/wpmuLogNewRegistrations.php
index 56a0915b93..26740d4725 100644
--- a/tests/phpunit/tests/multisite/wpmuLogNewRegistrations.php
+++ b/tests/phpunit/tests/multisite/wpmuLogNewRegistrations.php
@@ -18,4 +18,35 @@ class Tests_Multisite_wpmuLogNewRegistrations extends WP_UnitTestCase {
 		$reg_blog = $wpdb->get_col( $wpdb->prepare( "SELECT email FROM {$wpdb->registration_log} WHERE {$wpdb->registration_log}.blog_id = 1 AND IP LIKE %s", $ip ) );
 		$this->assertSame( $user->user_email, $reg_blog[ count( $reg_blog ) - 1 ] );
 	}
+
+	/**
+	 * Ensures an IPv6 remote address is preserved when logging a registration.
+	 *
+	 * @ticket 63986
+	 */
+	public function test_wpmu_log_new_registrations_preserves_ipv6_address() {
+		global $wpdb;
+
+		$ipv6                   = '2001:0db8:85a3:0000:0000:8a2e:0370:7334';
+		$original_remote_addr   = isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : null;
+		$_SERVER['REMOTE_ADDR'] = $ipv6;
+
+		try {
+			wpmu_log_new_registrations( 1, 1 );
+
+			$logged_ip = $wpdb->get_var( "SELECT IP FROM {$wpdb->registration_log} WHERE blog_id = 1 ORDER BY ID DESC LIMIT 1" );
+		} finally {
+			if ( null === $original_remote_addr ) {
+				unset( $_SERVER['REMOTE_ADDR'] );
+			} else {
+				$_SERVER['REMOTE_ADDR'] = $original_remote_addr;
+			}
+		}
+
+		$this->assertSame(
+			$ipv6,
+			$logged_ip,
+			'The IPv6 remote address was not stored intact in the registration log.'
+		);
+	}
 }
