diff --git a/civicrm.php b/civicrm.php
index 2208f646130d7465086d5ffe255de9f8a1defc4b..f3890af7c6e30a7e645932bfbc2e58c5c5ccd803 100644
--- a/civicrm.php
+++ b/civicrm.php
@@ -308,7 +308,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';
     }