WordPress

pętla — Nie można dodać nowej wtyczki ani motywów w sieci wielostanowiskowej WordPress z witryny głównej jako administrator. Błąd: ERR_TOO_MANY_REDIRECTS

  • 14 kwietnia, 2020
  • 4 min read
pętla — Nie można dodać nowej wtyczki ani motywów w sieci wielostanowiskowej WordPress z witryny głównej jako administrator.  Błąd: ERR_TOO_MANY_REDIRECTS


Nie mogę dodawać nowych wtyczek ani motywów w wielostanowiskowej sieci WordPress z witryny głównej jako superadministrator. Pokazuje ten błąd: ERR_TOO_MANY_REDIRECTS. Mogę jednak uzyskać dostęp do wszystkich stron, zalogować się do pulpitu nawigacyjnego każdej witryny, a nawet wprowadzić zmiany w istniejących kodach zainstalowanych wtyczek lub motywów. Nie mogę zainstalować żadnych nowych, a sieć utknęła w pętli.

Problemu można jednak uniknąć, jeśli wyłączę opcję multisite, używając następującego kodu w wp-config.php:

define('MULTISITE', false);
define('SUBDOMAIN_INSTALL', false);

Czy jest na to jakaś trwała poprawka, dzięki której nie muszę wyłączać mojej sieci wielostanowiskowej, aby dodawać nowe wtyczki lub motywy?

Oto kopia mojego pliku wp-config.php (uwierzytelnianie/tajemnice zostały usunięte ze względów bezpieczeństwa):

<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the
 * installation. You don't have to use the web site, you can
 * copy this file to "wp-config.php" and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * MySQL settings
 * * Secret keys
 * * Database table prefix
 * * ABSPATH
 *
 * @link 
 *
 * @package WordPress
 */

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', '' );

/** MySQL database username */
define( 'DB_USER', '' );

/** MySQL database password */
define( 'DB_PASSWORD', '' );

/** MySQL hostname */
define( 'DB_HOST', '' );

/** Database Charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );

/** The Database Collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );

/**#@+
 * Authentication Unique Keys and Salts.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link  WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
 *
 * @since 2.6.0
 */
define( 'AUTH_KEY',         '' );
define( 'SECURE_AUTH_KEY',  '' );
define( 'LOGGED_IN_KEY',    '' );
define( 'NONCE_KEY',        '' );
define( 'AUTH_SALT',        '' );
define( 'SECURE_AUTH_SALT', '' );
define( 'LOGGED_IN_SALT',   '' );
define( 'NONCE_SALT',       '' );

/**#@-*/

/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each
 * a unique prefix. Only numbers, letters, and underscores please!
 */
$table_prefix = '';

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 *
 * For information on other constants that can be used for debugging,
 * visit the Codex.
 *
 * @link 
 */
define( 'WP_DEBUG', false );
//define( 'WP_CACHE', true );
require_once( dirname( __FILE__ ) . '/gd-config.php' );
define( 'FS_METHOD', 'direct' );
define( 'FS_CHMOD_DIR', (0705 & ~ umask()) );
define( 'FS_CHMOD_FILE', (0604 & ~ umask()) );

/* Multisite */
define ('WP_ALLOW_MULTISITE', true);

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'example.com');
define('PATH_CURRENT_SITE', "
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

define( 'COOKIE_DOMAIN', '' );
define( 'ADMIN_COOKIE_PATH', " );
define( 'COOKIEPATH', " );
define( 'SITECOOKIEPATH', " );

/* That's all, stop editing! Happy publishing. */

/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
    define( 'ABSPATH', dirname( __FILE__ ) . " );
}

/** Sets up WordPress vars and included files. */
require_once( ABSPATH . 'wp-settings.php' );

Oto kopia mojego pliku .htaccess:

# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
</IfModule>

# END WordPress

Próbowałem następujących rzeczy:

  1. Czyszczenie historii przeglądania, ciasteczek, pamięci podręcznej – nie pomogło
  2. Wyłączenie wszystkich aktywnych wtyczek z witryny głównej — nie zadziałało
  3. Wyłączenie bieżącego motywu – nie zadziałało
  4. Zmiana nazwy pliku .htaccess na inną – nie zadziałała
Warto przeczytać!  Jak ukryć nazwę użytkownika podczas rejestracji w wordpress?

Próbowałem uruchomić adres URL przez redirect-checker.org i to jest wiadomość, którą podali, pierwszy adres URL to adres URL, który otwiera się po kliknięciu „Dodaj nową wtyczkę”, drugi adres URL to adres URL, który przekierowuje wordpress i utknie w pętli.


302 Found


200 OK

Byłbym wdzięczny za wszelką pomoc i czekam na odpowiedź.

Dzięki


Źródło