I am busy moving all sites to HTTPS (using ZeroSSL/Letsencrypt) on a Hetzner.de managed hosting server. I have this working for a single site but my multisite installation is giving me issues.

My main site (top-node.com) works without an issue (frontend and backend), however, I cannot log into the network admin options to install new plugins, etc. (kind of a deal breaker right there).

When I'm logged into the main site's admin backend, the link to the network admin should be https://top-node.com/wp-admin/network/. However, this is rewritten to https://http//top-node.com/wp-admin/network/ - there seems to be some (.htaccess) magic happening here.

In my quest to solve this, I have resorted to downloading the complete site and database and searching for any references of http// and other variations, but this is not stored anywhere.

I have also tried various .htaccess adaptations but this did not solve the problem either. Here is my current version:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

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

# END WordPress

I'm at my wits end, so I'll appreciate any suggestions.

  • What is your WP_HOME and WP_SITEURL defined as in your wp-config.php file? – Swen Aug 20 '17 at 12:21
  • They are not set at all in wp_config.php - it worked without? – roland Aug 20 '17 at 17:58
  • Also, setting these, does not fix the problem. – roland Aug 25 '17 at 7:34

For me, it was removing http:// from DOMAIN_CURRENT_SITE in my wp-config.php.

before define( 'DOMAIN_CURRENT_SITE', 'http://example.com' );

after define( 'DOMAIN_CURRENT_SITE', 'example.com' );

| improve this answer | |

For HTTPS rewrite, use this:

RewriteCond %{HTTP_HOST} (?!^www\.)^(.+)$ [OR]
RewriteCond %{HTTPS} off
RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L]

For WordPress rewrite, use the appropriate one shown here: https://codex.wordpress.org/htaccess . Go with the Basic one first, adjust if a subdirectory.

For the URLs used in the wp-options table, use the full HTTPS URL for your site (in two places). Entry in wp-config.php is not needed.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.