0

I would like to create a local development environment from my production, multisite, WordPress website. I have used the Migrate DB plugin with the following search and replace settings:

//domain.com  -> //domain.local

https://domain.com -> http://domain.local

https://domain.local -> http://domain.local

/data/sites/web/domain.com -> /var/www/html

Now it works all fine, locally, but without multisite enabled. As soon as Multisite is enabled it still tries to redirect me to HTTPS.

So as soon as I enable these settings in wp_config.php, I am not able to login at http://domain.local/wp-admin anymore:

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'domain.local');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

And it redirects me from http://domain.local/wp-admin to https://domain.local/wp-login.php?redirect_to=http%3A%2F%2Fdomain.local%2Fwp-admin%2F&reauth=1 which causes an ERR_CONNECTION_CLOSED

Any ideas what this is causing? Further I tried:

  • empty all active_plugins cells in every wp_options table (so also for every subsite), so there should not be any active.
  • Add define('WP_CACHE', false); at the top of wp_config.php

Not sure if there could be any other setting specifically for https in Multisites. As I just told, without multisite enabled in wp-config.php I am able to reach http://domain.local/wp-admin, but with multisite enabled I am not and it's trying to redirect me to an https domain which results in an error.

EDIT:

I seem to have found the issue, I have moved all plugins to a separate folder (temporarily) and now the website works. I am able to reach wp-admin without any issues. So a plugin still seem to be the problem, even though I have disabled all plugins via the database.

0

The reason why my website was still redirecting to HTTPS was because of a plugin. The plugin was disabled, by emptying the database cell which contains the "active plugins", but still it was overruling every WordPress setting so it seemed. Every setting in wp-config.php which should overrule database settings or disabling/removing cache, didn't worked out. I tried literally everything which can be found on most blogs, the WordPress documentation etc.

But moving all plugins from wp-content/plugins to a temporary folder called wp-content/plugins-backup helped me to reach the admin page and by moving the plugins back to the wp-content/plugins folder, one by one (or a few at a time), helped me figuring out which plugin was the problem.

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.