Shifter Static will access your site with User-Agent of ShifterGenerator/{version} when it's creating artifact.

You can detect WordPress is running, or Shifter is generating artifact with using this User-Agent.

For example, you can set function $_SERVER['HTTP_USER_AGENT'] which contains above User-Agent, on PHP scripts.

if ( isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'],'ShifterGenerator') !== false ) {

// some processes
// while Shifter is generating artifacts

} else {

// some processes
// while Shifter is not generating artifacts

}

Did this answer your question?