Support » Networking WordPress » Setup multisite inside a subdirectory as a test site

  • I need to upload my multisite from local server to staging server inside a directory e.g mydomain.com/multisite and all other sites like mydomain.com/multisite/site1, mydomain.com/multisite/site2 and so on.
    I couldnt find a definite solution with the changes in wp-config.php and .htaccess file. Anyhow the site main url redirects to wp-signup.php page. See My code below for the example changes I have made.

    wp-config.php
    define(‘DOMAIN_CURRENT_SITE’, ‘www.mydomain.com’);
    define(‘PATH_CURRENT_SITE’, ‘/multisite/’);

    htaccess:
    RewriteBase /multisite/

    and the respective changes to the databases, but the error remains same.

    • This topic was modified 1 week, 3 days ago by  thesaurav.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • David Sword

    (@davidsword)

    Mine worked fine with:

    define('WP_DEBUG', true)
    
    define( 'WP_ALLOW_MULTISITE', true );
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'localhost');
    define('PATH_CURRENT_SITE', '/multisite/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    and

    RewriteEngine On
    RewriteBase /multisite/
    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]

    The only thing I could see from the docs is that you need to setup before – but that shouldn’t matter when you’re migrating.

    If you plan to run WordPress out of its own directory, do that before activating Multisite.

    Do you get any apache/php errors?

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.