diff --git a/civicrm.php b/civicrm.php
index d56fa8af4fd136be908c06924ac24bb8ea53a65a..0785767ed0d61b027678023cbf405c79fefe9845 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';
     }