Skip to content

Plugins load order

Depending on how a plugin is loaded, it will hook into the WordPress load order at different points (from latest to earliest):

  1. Manually activated from the wp-admin Plugins screen (supported, but code activation is preferred): before the plugins_loaded hook
  2. wpcom_vip_load_plugin( 'plugin-name' ) in a theme’s functions.php (supported, but code activation from client-mu-plugins is preferred): before the after_setup_theme hook
  3. wpcom_vip_load_plugin( 'plugin-name' ) from client-mu-plugins (recommended): on the muplugins_loaded hook

Sometimes plugins may have dependencies on running before specific hooks. In order to hook on very early actions or filters, the plugin’s code will need to load from /client-mu-plugins directory.

Last updated: March 16, 2022