Media Temple上的WordPress:“太多重定向”错误

时间:2014-04-26 15:14:58

标签: wordpress redirect mediatemple

我有一个WordPress网站,我正从另一个提供商转移到Media Temple网格服务器。我有自己的WordPress' wp'目录,所以我可以独立于我的代码库的其余部分更新它。

上传完所有文件后,我访问了我网站的网址,期望WordPress会启动其安装过程,相反,它会从http://example.com重定向到http://example.com/wp-admin/install.php和浏览器给了我一个"太多的重定向"错误信息。

其他事项:

  • 创建数据库
  • .htaccess文件包含所有WordPress规则

这是我的wp-config.php:

    <?php
    // ===================================================
    // Load database info and local development parameters
    // ===================================================
    if ( file_exists( dirname( __FILE__ ) . '/wp-config-local.php' ) ) {

        define( 'WP_LOCAL_DEV', true );
        define( 'WP_DEBUG', true );
        define( 'WP_DEBUG_LOG', true );
        define( 'WP_DEBUG_DISPLAY', true );

        require( 'wp-config-local.php' );

    } elseif ( file_exists( dirname( __FILE__ ) . '/wp-config-staging.php' ) ) {

        define( 'WP_LOCAL_DEV', false );
        define( 'WP_DEBUG', true );
        define( 'WP_DEBUG_LOG', true );
        define( 'WP_DEBUG_DISPLAY', true );

        require( 'wp-config-staging.php' );

    } elseif ( file_exists( dirname( __FILE__ ) . '/wp-config-production.php' ) ) {

        define( 'WP_LOCAL_DEV', false );
        define( 'WP_DEBUG', false );

        require( 'wp-config-production.php' );
    }

    // ========================
    // Custom Content Directory
    // ========================
    define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/content' );
    define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/content' );

    // ================================================
    // You almost certainly do not want to change these
    // ================================================
    define( 'DB_CHARSET', 'utf8' );
    define( 'DB_COLLATE', '' );

    // ==============================================================
    // Salts, for security
    // Grab these from: https://api.wordpress.org/secret-key/1.1/salt
    // ==============================================================
    define('AUTH_KEY',         '+jw|C|KUKW4.&062<MjcDr/a95AOdg$tH5N^7-arnWXWD$V=5+RUUe-#YNW<~INo');
    define('SECURE_AUTH_KEY',  'Tu?%@u{.<-9^8Qi+wtB-X;5`-b!(4U)#:B`4?~-R,.,H~kTyCRX#b[Rf@V9m/,DW');
    define('LOGGED_IN_KEY',    'Kf_!-|N|kII`+:j7x2~QBQR_nVQ/ uvCPif/$|wk})lm YR{Y^8qji/X![jljpE]');
    define('NONCE_KEY',        'YA+GiHY&N<)Gh`f-KR 0+BF4I]jP-Tn.b+V-Z1+}/P!B+:Lfr~(qB(u$_QCaUFM6');
    define('AUTH_SALT',        'U96${|%&HN-l)aP.*.@ZK2&nIp@l~3X0-{Rx$Fgll4oY&-YM/UVw9bf<Tyk=S@v>');
    define('SECURE_AUTH_SALT', '>f-^11d$V|M#bm2K.Rzk1i=H+Ykpv`9lVgsBd+}W5&@rS_!k=EZsy0-]&S3!sNk[');
    define('LOGGED_IN_SALT',   '#2iH05hI2h87P:a!}`jsqH3>E#q0g)|Ns9g{T;($S%,n>+dP)W-l9{@whhnib:1Q');
    define('NONCE_SALT',       '_I90W[ST<|bmKC<i*J.-tq+R+wqyAkUd-~33*E?k!:%O3)rRZ~yc-PpVA<R+OcTR');

    // ==============================================================
    // Table prefix
    // Change this if you have multiple installs in the same database
    // ==============================================================
    $table_prefix  = 'wp_';

    // ================================
    // Language
    // Leave blank for American English
    // ================================
    define( 'WPLANG', '' );

    // ===========
    // Hide errors
    // ===========
    ini_set( 'display_errors', 0 );
    define( 'WP_DEBUG_DISPLAY', false );

    // =================================================================
    // Debug mode
    // Debugging? Enable these. Can also enable them in local-config.php
    // =================================================================
    // define( 'SAVEQUERIES', true );
    // define( 'WP_DEBUG', true );

    // ======================================
    // Load a Memcached config if we have one
    // ======================================
    if ( file_exists( dirname( __FILE__ ) . '/memcached.php' ) )
        $memcached_servers = include( dirname( __FILE__ ) . '/memcached.php' );

    // ===========================================================================================
    // This can be used to programatically set the stage when deploying (e.g. production, staging)
    // ===========================================================================================
    define( 'WP_STAGE', '%%WP_STAGE%%' );
    define( 'STAGING_DOMAIN', '%%WP_STAGING_DOMAIN%%' ); // Does magic in WP Stack to handle staging domain rewriting

    // ===================
    // Bootstrap WordPress
    // ===================
    if ( !defined( 'ABSPATH' ) )
        define( 'ABSPATH', dirname( __FILE__ ) . '/wp/' );
    require_once( ABSPATH . 'wp-settings.php' );

这是wp-config-production.php:

    <?php
    /*
    This is a sample local-config.php file
    In it, you *must* include the four main database defines

    You may include other settings here that you only want enabled on your local development checkouts
    */

    define( 'DB_NAME', 'db000000_wordpress' );
    define( 'DB_USER', 'db000000' );
    define( 'DB_PASSWORD', 'some_password' );
    define( 'DB_HOST', 'internal-db.s000000.gridserver.com' ); // Probably 'localhost'

对我做错了什么的想法?

1 个答案:

答案 0 :(得分:0)

解决了这个问题 - 事实证明我上传了一个.htaccess文件,而且这个文件正在进行一些导致重定向问题的重写。