2

The links in the navbar menu, in (My sites > Manage the network) are pointing (and keep redirecting) to incorrect URLs.

The incorrect URLs are in this pattern:

https://https//www.domain.com/wp-admin/network/
https://https//www.domain.com/wp-admin/network/sites.php
https://https//www.domain.com/wp-admin/network/settings.php

Even if I manually entered the correct URL without the repeated https, I am redirected to the wrong URL again.

It seems that https//www is set somewhere instead of https://www, I can't find where.

Places that I have looked and they were OK:

  • wp-config.php (DOMAIN_CURRENT_SITE)
  • .htaccess
  • site table (domain only, with www but not https or /)
  • options table (situeurl and home)
  • sitemeta table

I haven't updated any of the above-mentioned. They were OK. (So not cache issue)

I tried the Search option of my phpMyAdmin using https//www but didn't return any match.

Where else should I look?

3

There are 5 values need to change. From database.

wp_options: options named “siteurl” and “home”

wp_site

wp_sitemeta: the option named “siteurl”

wp_blogs: any entries in the “domains” column that have the old domain name

wp_#_options: Each sub-site will have sets of tables that correspond to the blog_id in the wp_blogs table. You need to go to the wp_#_options table, where # corresponds to the blog_id, and update the “siteurl” and “home” settings in that table.

Note: In most cases, you may/will need to update an entry in your WP-Config.php file. The code I would recommend taking a look at is the code snippet here:

define('WP_ALLOW_MULTISITE', true);
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );
$base = '/';
define( 'DOMAIN_CURRENT_SITE', 'mysite.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
| improve this answer | |
0

Have you checked wp_blogs? Is it OK?

Also, make sure that all the pre-defined constants in your wp-config.php file are commented out. Otherwise, they will override the database settings.

| improve this answer | |
  • Thanks for your reply. I just checked blogs table, they are all OK. The domain is www.domain.com, no http or https. and the paths are OK too. The constants aren't commented out but they are OK – Abdulrahman Hassoun Feb 2 '19 at 12:04
0

The multisite URLs are available for editing on the Network Admin, Sites page, then edit the subsites (click on a subsite's edit link, then the Settings tab). You can only do this for subsites.

The 'siteurl' and 'home' values should be the full URL of the site, including the protocol, as in https://www.example.com/site1 . If those values do not include the protocol (the 'https://' part), then any links of the site will include the 'double protocol' value that you are experiencing.

The main site URL cannot be edited on this screen; go into the wp-options table to fix that (in two places).

I never change the site URLs in the wp-config.php file, as suggested by other answers and comments. The proper place (IMHO) to make the site URL setting is the wp-options table (for the main site), and the procedure above for the sub-sites.

Note that the above procedure will also let you change any incorrect URLs saved by any plugins that write to the options table. I've had to change that a couple of times when I moved a site to a new domain.

| improve this answer | |
  • Thank you for the detailed answer. I have double checked the wp-options table and both fields have the full URL with the protocol HTTPS. I have also tried changing it to HTTP but the double protocol issue is still there. – Abdulrahman Hassoun Feb 3 '19 at 11:53
0

Add this code to your wp-config.php file,

define('WP_HOME','https://yoursite.com');
define('WP_SITEURL','https://yoursite.com');

If still, you face the issue then login to your phpMyAdmin and then,

  • Choose the name of the database from the left-hand sidebar and open the wp_options database table.
  • Search for the site URL and home rows, click edit to modify the URLs. You can see a box in front of option_value to fill in the URL.
  • Click on the Go button to save settings.

Also, make your URL start with https:// not http// (you mentioned above)

| improve this answer | |
  • Thank you for your answer. The steps were previously done as mentioned above. – Abdulrahman Hassoun Feb 2 '19 at 12:02
  • Can you try to add the above code and check? – Arvind Singh Feb 2 '19 at 12:27
  • Added. Still the same. In my wp-config now I have WP_HOME, WP_SITEURL, AND DOMAIN_CURRENT_SITE. All of the 3 are pointing to the correct, full, HTTPS URL. – Abdulrahman Hassoun Feb 3 '19 at 11:54
0

You have to change at two places:

1- in Database wp_blogs table change example.com to www.example.com

2- in wp-config.php change define('DOMAIN_CURRENT_SITE', 'example.com'); to define('DOMAIN_CURRENT_SITE', 'www.example.com');

It will work automatically.

| 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.