diff --git a/civicrm.php b/civicrm.php
index 6d822d3ecd8e00f048214ea2d791f4fdb4ae57d2..1b7a3ed1f10809af9a18741938d9ac5b70738978 100644
--- a/civicrm.php
+++ b/civicrm.php
@@ -309,7 +309,9 @@ class CiviCRM_For_WordPress {
     if ( $this->civicrm_in_wordpress() ) {
       // this is required for AJAX calls in WordPress admin
       $_GET['noheader'] = TRUE;
-    } else {
+    }
+
+    if ( !CIVICRM_INSTALLED && !$this->civicrm_in_wordpress() ) {
       $_GET['civicrm_install_type'] = 'wordpress';
     }