Is there anyway to detect that WordPress is hosted on WPEngine? The reason why I need to know it in their approach to eliminate cookies. But my plugin relies on cookie and can’t work without it. So I need to not run the plugin on WPEngine hosting. Any thoughts?
1 comment
Comments are closed.
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 exampleWPE_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.