What is the very earliest action hook you can call?

After the solution to this question was to get a function to launch BEFORE the init action is fired by taking the sequence out of its function, it got me thinking, is there any earlier in the WP load sequence that I can hook a function into?

3

muplugins_loaded is the earliest hook.

Depending on your wordpress setup, you may not have any plugins in the MU_PLUGINS directory. In that case this hook may not fire.

The next best hook to trigger is plugins_loaded.

RESOURCES

  1. WordPress Codex – Action Reference List
  2. Q/A: How to get WordPress’ hook run sequence?
  3. Q/A: Make sense of WP Load Core

Leave a Comment