7.1 Core files involved in the update system

These paths are relative to the WordPress installation root. The role column summarizes responsibilities.

How it works

Update logic spans wp-includes and wp-admin/includes. Cron and transient management live in wp-includes/update.php. Admin-only helpers and checksum functions live under wp-admin/includes. Interface screens live under wp-admin.

Interactive core upgrades are driven from wp-admin/update-core.php (the screen and do_core_upgrade()), while the low-level copy and rename routines live in wp-admin/includes/update-core.php (required during a core upgrade after the new package is unpacked).

Process flow

  1. Load order depends on context: front end, admin, AJAX, or CLI.
  2. Admin includes load before upgraders run.
  3. Plugin and theme install, update, and delete operations often use AJAX handlers in ajax-actions.php.
  4. Interactive core upgrade and reinstall use the update-core.php screen and includes file, not the AJAX entry points.

Reference

Relative pathRole
wp-includes/update.phpVersion and package checks, wp_maybe_auto_update(), cron hooks, wp_get_update_data()
wp-admin/includes/update.phpget_core_updates(), find_core_auto_update(), dismiss helpers, update_nag(), get_core_checksums()
wp-admin/includes/upgrade.phpwp_upgrade(), dbDelta(), upgrade_all(), schema migration
wp-admin/includes/admin-filters.phpHooks update_nag() to admin notices
wp-admin/includes/class-wp-upgrader-skin.phpBase skin API
wp-admin/includes/class-automatic-upgrader-skin.phpBackground and AJAX message capture
wp-admin/includes/class-wp-ajax-upgrader-skin.phpAJAX errors and messages
wp-admin/includes/class-bulk-upgrader-skin.phpBulk progress interface
wp-admin/includes/class-wp-upgrader.phpBase upgrader, upgrader_process_complete
wp-admin/includes/class-wp-automatic-updater.phpBackground update decisions and execution
wp-admin/includes/class-plugin-upgrader.phpPlugin upgrade and install
wp-admin/includes/class-theme-upgrader.phpTheme upgrade and install
wp-admin/includes/class-core-upgrader.phpCore upgrade; Core_Upgrader::check_files() compares installed files to get_core_checksums()
wp-admin/includes/update-core.phpCore upgrade routines (notably update_core()); required after unpacking (distinct from the update-core.php admin screen)
wp-admin/includes/class-language-pack-upgrader.phpTranslation packages
wp-admin/includes/file.phpWP_Filesystem, request_filesystem_credentials(), verify_file_signature(), wp_trusted_keys(), FS_METHOD integration
wp-admin/update-core.phpCore updates admin interface; do_core_upgrade(), reinstall
wp-admin/includes/ajax-actions.phpAJAX handlers for plugin, theme, and core install, update, and delete (such as wp_ajax_update_plugin); not the interactive core upgrade path
wp-includes/load.phpwp_is_file_mod_allowed()
wp-includes/class-wp-plugin-dependencies.phpWP_Plugin_Dependencies (dependency graph for plugin list, activation, and related AJAX)
wp-admin/includes/class-wp-site-health.phpWP_Site_Health diagnostics
wp-includes/class-wp-recovery-mode.phpWP_Recovery_Mode

Developer resources


7.2 Key classes

Classes partition download, install, automatic decisions, skins, and recovery into distinct responsibilities.

How it works

WP_Upgrader subclasses specialize behavior per package type. WP_Automatic_Updater wraps scheduled application. Skins subclass WP_Upgrader_Skin. WP_Recovery_Mode handles fatal recovery separately from updates.

Process flow

  1. The entry point selects a class through instantiation.
  2. Methods call parent hooks.
  3. Results propagate to skins or email layers.

Reference

ClassFileExtendsRole
WP_Upgraderclass-wp-upgrader.phpBase download and install
Core_Upgraderclass-core-upgrader.phpWP_UpgraderCore file replacement
Plugin_Upgraderclass-plugin-upgrader.phpWP_UpgraderPlugin updates and installs
Theme_Upgraderclass-theme-upgrader.phpWP_UpgraderTheme updates and installs
Language_Pack_Upgraderclass-language-pack-upgrader.phpWP_UpgraderTranslation packages
WP_Automatic_Updaterclass-wp-automatic-updater.phpBackground update decisions and execution
WP_Recovery_Modeclass-wp-recovery-mode.phpFatal error recovery

Developer resources


Author

Photo de Quentin Le Duff

Quentin Le Duff

Quentin Le Duff is a WordPress developer for ten years, Opquast® Expert & ISTQB certified. He works with WordPress every day: developing open source plugins and themes, hosting and maintaining his clients’ websites, and writing about the WP ecosystem.