# wp_get_update_php_url()

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

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

## Сигнатура

```php
wp_get_update_php_url(): string
```

## Описание

Этот URL можно переопределить, задав переменную окружения WP_UPDATE_PHP_URL или воспользовавшись фильтром «wp_update_php_url». Передача пустой строки не допускается и приведёт к использованию URL по умолчанию. Кроме того, страница, на которую ведёт URL, желательно должна быть локализована на язык сайта.

## Возвращаемое значение

`string`

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

Файл: `wp-includes/functions.php:8524`

```php
function wp_get_update_php_url() {
	$default_url = wp_get_default_update_php_url();

	$update_url = $default_url;
	if ( false !== getenv( 'WP_UPDATE_PHP_URL' ) ) {
		$update_url = getenv( 'WP_UPDATE_PHP_URL' );
	}

	/**
	 * Filters the URL to learn more about updating the PHP version the site is running on.
	 *
	 * Providing an empty string is not allowed and will result in the default URL being used. Furthermore
	 * the page the URL links to should preferably be localized in the site language.
	 *
	 * @since 5.1.0
	 *
	 * @param string $update_url URL to learn more about updating PHP.
	 */
	$update_url = apply_filters( 'wp_update_php_url', $update_url );

	if ( empty( $update_url ) ) {
		$update_url = $default_url;
	}

	return $update_url;
}
```

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

- 5.1.0 — Introduced.

## Связанные

Использует: [`wp_get_default_update_php_url`](https://chugunov.pro/api-wordpress/functions/wp_get_default_update_php_url/), [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/).
Используется в: [`wp_get_update_php_annotation`](https://chugunov.pro/api-wordpress/functions/wp_get_update_php_annotation/), `WP_Site_Health::get_test_php_version`, [`validate_plugin_requirements`](https://chugunov.pro/api-wordpress/functions/validate_plugin_requirements/), [`wp_dashboard_php_nag`](https://chugunov.pro/api-wordpress/functions/wp_dashboard_php_nag/), `WP_Customize_Theme_Control::content_template`, [`customize_themes_print_templates`](https://chugunov.pro/api-wordpress/functions/customize_themes_print_templates/), `WP_Plugins_List_Table::single_row`, [`wp_plugin_update_row`](https://chugunov.pro/api-wordpress/functions/wp_plugin_update_row/), [`wp_theme_update_row`](https://chugunov.pro/api-wordpress/functions/wp_theme_update_row/), [`install_plugin_information`](https://chugunov.pro/api-wordpress/functions/install_plugin_information/), `WP_Plugin_Install_List_Table::display_rows`, [`update_core`](https://chugunov.pro/api-wordpress/functions/update_core/), [`list_core_update`](https://chugunov.pro/api-wordpress/functions/list_core_update/), [`list_plugin_updates`](https://chugunov.pro/api-wordpress/functions/list_plugin_updates/), [`list_theme_updates`](https://chugunov.pro/api-wordpress/functions/list_theme_updates/).

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