$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>Multisite network subdomains doesn't work|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Multisite network subdomains doesn't work

matteradmin8PV0评论

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','');
#define('WP_SITEURL','');

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

And wildcard:

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

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far