Skip to content

Plugins load order

Depending on the method used to activate a plugin, it will hook into the WordPress load order at different points. Plugins will load based on the following hooks—from earliest to latest in the WordPress load process—when activated with the described methods:

  1. On the muplugins_loaded hook: Plugins that are activated via wpcom_vip_load_plugin( 'plugin-name' ) from client-mu-plugins. This method of code-activating plugins is recommended.
  2. Before the after_setup_theme hook: Plugins that are activated via wpcom_vip_load_plugin( 'plugin-name' ) in a theme’s functions.php. This method is supported, but code activation from client-mu-plugins is preferred.
  3. Before the plugins_loaded hook: Plugins that are manually activated from the WordPress Admin dashboard Plugins screen. This method is supported, but activating plugins through code is recommended.

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

Last updated: December 26, 2023

Relevant to

  • WordPress