# ms_not_installed()

URL: https://chugunov.pro/api-wordpress/functions/ms_not_installed/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 3.0.0.

## Сигнатура

```php
ms_not_installed( string $domain, string $path )
```

## Описание

Используется, когда таблицы блога отсутствуют. Также проверяет отсутствие таблицы $wpdb->site.

## Параметры

- `$domain` `string` — обязательный. Запрошенный домен, на который ссылается ошибка.
- `$path` `string` — обязательный. Запрошенный путь, на который ссылается ошибка.

## Исходный код

Файл: `wp-includes/ms-load.php:469`

```php
function ms_not_installed( $domain, $path ) {
	global $wpdb;

	if ( ! is_admin() ) {
		dead_db();
	}

	wp_load_translations_early();

	$title = __( 'Error establishing a database connection' );

	$msg   = '<h1>' . $title . '</h1>';
	$msg  .= '<p>' . __( 'If your site does not display, please contact the owner of this network.' ) . '';
	$msg  .= ' ' . __( 'If you are the owner of this network please check that your host&#8217;s database server is running properly and all tables are error free.' ) . '</p>';
	$query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $wpdb->site ) );
	if ( ! $wpdb->get_var( $query ) ) {
		$msg .= '<p>' . sprintf(
			/* translators: %s: Table name. */
			__( '<strong>Database tables are missing.</strong> This means that your host&#8217;s database server is not running, WordPress was not installed properly, or someone deleted %s. You really should look at your database now.' ),
			'<code>' . $wpdb->site . '</code>'
		) . '</p>';
	} else {
		$msg .= '<p>' . sprintf(
			/* translators: 1: Site URL, 2: Table name, 3: Database name. */
			__( '<strong>Could not find site %1$s.</strong> Searched for table %2$s in database %3$s. Is that right?' ),
			'<code>' . rtrim( $domain . $path, '/' ) . '</code>',
			'<code>' . $wpdb->blogs . '</code>',
			'<code>' . DB_NAME . '</code>'
		) . '</p>';
	}
	$msg .= '<p><strong>' . __( 'What do I do now?' ) . '</strong> ';
	$msg .= sprintf(
		/* translators: %s: Documentation URL. */
		__( 'Read the <a href="%s" target="_blank">Debugging a WordPress Network</a> article. Some of the suggestions there may help you figure out what went wrong.' ),
		__( 'https://developer.wordpress.org/advanced-administration/debug/debug-network/' )
	);
	$msg .= ' ' . __( 'If you are still stuck with this message, then check that your database contains the following tables:' ) . '</p><ul>';
	foreach ( $wpdb->tables( 'global' ) as $t => $table ) {
		if ( 'sitecategories' === $t ) {
			continue;
		}
		$msg .= '<li>' . $table . '</li>';
	}
	$msg .= '</ul>';

	wp_die( $msg, $title, array( 'response' => 500 ) );
}
```

## История изменений

- 4.4.0 — The $domain and $path parameters were added.
- 3.0.0 — Introduced.

## Связанные

Использует: `wpdb::esc_like`, [`wp_load_translations_early`](https://chugunov.pro/api-wordpress/functions/wp_load_translations_early/), [`dead_db`](https://chugunov.pro/api-wordpress/functions/dead_db/), `wpdb::tables`, [`__`](https://chugunov.pro/api-wordpress/functions/__/), [`is_admin`](https://chugunov.pro/api-wordpress/functions/is_admin/), [`wp_die`](https://chugunov.pro/api-wordpress/functions/wp_die/), `wpdb::get_var`, `wpdb::prepare`.

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/ms_not_installed/
