• Resolved Omar

    (@onabhani)


    Hello

    Yesterday I was trying to start my network sites using WordPress. I follow the official steps that already shared about multisite.
    Now, I added a new site and it is subdomain from Cpanel. when I try to visit the subsite it shows the ‘index of’ page and if I try to access the dashboard of the same subsite it is showing ‘file not found’.

    i added the following code to wp-config.php file:

      define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'mymaindomain');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    and update .htaccess with the following:

       <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    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>

    Could I have some help, please?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • That’s exactly what you should see after adding the subdomain to CPanel.

    Now you need to point the subdomain via Cpanel to the main webserver directory where your multisite WordPress resides. It will probably be something like the public_html directory of your webserver… the same one that Apache uses.

    Right now you are seeing the one that Cpanel made for that subdomain and it is empty.

    Your webhost (Blue Host) should be able to help you there if you get stuck.

    You’ll need to make sure you’ve added a subsite to your WordPress also and have mapped that domain within the WordPress itself to that subsite.

    Thread Starter Omar

    (@onabhani)

    Thank you Very much, issue has been solved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Showning “Index of” Page when Create a new subsite’ is closed to new replies.