diff --git a/civicrm.php b/civicrm.php
index 62dc3906b8d69bb7a009df447f009aef217b9268..a53cdacc966a06b506beddd5bead02c7bf113b3d 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';
     }