How to detect that site is hosted on WPEngine?

From a quick look at wpengines headers it looks like there may be some info you can check.
Your best bet is to get access to an account and dump out $_SERVER to see what’s in there. For example it looks like $_SERVER['SERVER_NAME'] = 'WP Engine/4.0'. or perhaps $_SERVER['HTTP_HOST'].

As per the comments below it also seems the wp-config.php on wpengine defines some custom constants you could check, for example WPE_APIKEY , WPE_ISP.

Of course the problem is this can change at anytime outside your control.

Updated:

There is another workaround to figure out whether WPEngine is used. WPEngine uses its own MU plugin, which contains WPE_API class. By checking whether this class exists, we can say whether the plugin is hosted on WPEngine hosting or not.

if ( class_exists( 'WPE_API', false ) ) {
    // is WPEngine hosting
} else {
    // is not WPEngine hosting
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)