0

I recently moved a WP Multisite Network to another host , changed the DNS of the domain and the wilcard for subdomains to point to the new IP, also added SSL to it. The main site is working just fine but i can't access the subdomains , the sites in the network , it just displays the default page of the server like there is nothing in the directory where it points to.

Main site: www.lifestyleworld.se One of the subdomains: marcelos.lifestyleworld.se

This is the setup i have in wp-config.php

define('AUTH_KEY', 'xxxxxxxxxxxxxxxxxxxxxxxxx');
define('SECURE_AUTH_KEY', 'xxxxxxxxxxxxxxxxxxxxxxxxx');
define('LOGGED_IN_KEY', 'xxxxxxxxxxxxxxxxxxxxxxxxx');
define('NONCE_KEY', 'xxxxxxxxxxxxxxxxxxxxxxxxx');
define('AUTH_SALT', 'xxxxxxxxxxxxxxxxxxxxxxxxx');
define('SECURE_AUTH_SALT', 'xxxxxxxxxxxxxxxxxxxxxxxxx');
define('LOGGED_IN_SALT', 'xxxxxxxxxxxxxxxxxxxxxxxxx');
define('NONCE_SALT', 'xxxxxxxxxxxxxxxxxxxxxxxxx');
$table_prefix  = 'wp_lifestyle21_se_';
define( 'WP_AUTO_UPDATE_CORE', true );
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);
define ('WPLANG', 'sv_SE');
define( 'WP_MEMORY_LIMIT', '128M' );

/* Multisite */
//define( 'WP_ALLOW_MULTISITE', true );
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'www.lifestyleworld.se');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

define('FORCE_SSL_ADMIN', true);

#define('WP_HOME','https://www.lifestyleworld.se');
#define('WP_SITEURL','https://www.lifestyleworld.se');

//Limit revisions to avoid filling database
define('WP_POST_REVISIONS', 3);

and the .htaccess

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]

I got www before the main domain in the database in wp_blogs if that's relevant

enter image description here

And wildcard:

enter image description here

I tried pinging the subdomains so and the IP address is corrent so that means that the wildcard is working.

One thing about this line

define('DOMAIN_CURRENT_SITE', 'www.lifestyleworld.se');

In the Network setup says to have it without www. , but if i use it like that when i try to enter the Network Admin it just redirects me to the front page

I spent two days trying to figure this out , i have no idea what am i missing

  • When you say the subsites don't work, can you be more specific? WSOD? Redirect? PHP Fatal? It's not clear ( it could be that when visiting a subsite, pizza arrives at the frontdoor, if so, how do I replicate your issue? :D ) – Tom J Nowell Mar 7 at 14:39
  • just click on the link i left at the begining ... i wish pizza arrives at the front door :) it shows default page of the server , like there is nothing in the directory where it points to ... – pashata Mar 7 at 17:57
  • I can't, the domain has a bad SSL certificate so I'm unable to make a connection. If the SSL error is the issue you have then that has nothing to do with WordPress. I see you updated your Q to explain it just shows the default server page, which is a very strong indicator that your Apache/Nginx setup is incomplete – Tom J Nowell Mar 8 at 2:55
  • The problem here will be that Apache is receiving the request, but doesn't know how to handle it, so it serves the default page. Nothing in the WP database or code will help as nothing is reaching WP to begin with on those subdomains. I don't think it's WP expertise you need, but Apache expertise – Tom J Nowell Mar 8 at 2:57
  • thanks man for clarifying that , i wasted too much time finding the problem in the code ... it turns out that the host doesn't support wildcard DNS records so i'm gonna have to define every newly registered subdomain manualy ... and eventualy moving the site again to a different host :D – pashata Mar 8 at 14:57

Your Answer

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

Browse other questions tagged or ask your own question.