• I have a wordpress installation with nginx and mysql whose domain is abc.com in the root / document

    Inside that documentroot, I have the /web path in which I have another wordpress2 installed.

    abc.com/web access wordpress2

    I want wordpress2 to be multisite, however when I include the multisite lines in the wp-config.php and try to create the new network, I cannot authenticate in wordpress and also, the “admin network” option does not appear to me.

    Could someone in my situation give me some advice?

    Thank you.

Viewing 1 replies (of 1 total)
  • Hello @aivts

    Can I confirm what you mean when you say when I include the multisite lines in the wp-config.php. Are you referring to the following line to Allow Multisite:

    define( 'WP_ALLOW_MULTISITE', true ); 

    Or do you mean the lines that your WordPress install presents during the Enabling the Network step?

    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    define( 'DOMAIN_CURRENT_SITE', 'abc.com' );
    define( 'PATH_CURRENT_SITE', '/web/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    If you mean this step, did WordPress also ask you to add some lines to your .htaccess file?

    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /web/
    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]

    If you are running the server on nginx, the .htaccess file solution might not work (it depends on how the server is configured) and you might need to add those lines to your nginx config manually. Additionally, the nginx config lines are slightly different from the Apache .htaccess ones.

    I was able to replicate your environment on my local Apache setup, and enable the multisite on the WordPress install in the /web/ directory, so I’m thinking it might be the nginx configs that are needed.

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress multiste, inside wordpress’ is closed to new replies.