1

I have multi site. (3 websites) So I want to apply different theme in one of the website. But when I activate the theme. All the sites are affected. Is it how the multisite works?? Can somebody clarify what can be done with multi site?

  1. Install MultiSite (Sub-Directory)
  2. Modified wp-config.php and .htaccess

    define( 'WP_ALLOW_MULTISITE', true );
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'localhost:8020');
    define('PATH_CURRENT_SITE', '/multi/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    

and .htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /multi/
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 ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>

# END WordPress
  1. Create another 2 sites

enter image description here

For some reason (The colon in the URL : before the port number is missing(another issue?)) so I modify the setting of the site to add colon because there's an error when I visit site. enter image description here

  1. Network activated the themes
  2. Activate theme1 in site1
  3. Activate theme2 in site2

But all the sites are the same.

I noticed that before I activate the theme the URL is

http://localhost:8020/multi/site2/wp-admin/themes.php

after I activated, it redirects to:

http://localhost:8020/multi/wp-admin/themes.php

Where did I go wrong?

  • 1
    This should not be happening. But you are not giving enough detail to analyse what might be the problem. – cjbj Jun 21 '17 at 8:08
  • @cjbj I modified the question. Please check. – Dean Jun 21 '17 at 9:09
0

It doesn't work like that. When you got to WP Network admin, you install the theme from there and you can Network Activate it if you want to. After that you go to the website WP Admin where you want to change the theme and activate it.

I have a Multisite where each website uses a different theme without any problems.

  • Yeah. That is what I think it should be so I am totally confused where did I go wrong. I modified the question, please check. – Dean Jun 21 '17 at 9:10
0

Step-1: In wp-config.php file add this line of code

define ( 'WP_ALLOW_MULTISITE', true );

Step-2: After that after that go to Tools > Network Setup and follow the instruction

  • copy all define() functions and paste onto wp-config.php just before/* That's all, stop editing! Happy blogging. */ and commented out the //define ( 'WP_ALLOW_MULTISITE', true );
  • Copy the htaccess rule code and paste onto .htaccess file in the root directory.

Step-3: Logout and Login again.

It should be working fine then.

Setting up the theme:
Go to Sites Page of Network admin dashboard. Where sites' url is supposed to be shown. By hovering over we can go any URL's dashboard.

Go to the Apearance > Theme page to activate any theme available.

Go to 'Visit Site' of any specific site's dashboard to see the difference. Hope this helps.

  • Yeah. That is how it should be. But unfortunately, it doesn't work for me. The last theme I activated will be the active theme to ALL sites. – Dean Jun 21 '17 at 9:24
  • I updated the steps. Would u plz follow. Let me know, if it resolves. – perfectionist1 Jun 21 '17 at 9:36
  • When I activate a theme in the 2nd site, it redirects to the default one. See the edited question. – Dean Jun 21 '17 at 9:37
  • Can you try the steps again from the begining of your network seteup after commenting/deleting the define() functions? Copy and paste the exact code which is given through the Network Setup page. – perfectionist1 Jun 21 '17 at 9:53
  • 1
    In the step #2 you mentioned, I got an error before "You cannot use port numbers such as :8020." so I modified wp-admin\includes\network.php. I guess this is where I went wrong? – Dean Jun 21 '17 at 9:58

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.