4

So I have setup multisite as per the WordPress website page: https://codex.wordpress.org/Create_A_Network

I'm using the latest WordPress 4.8.

Setup

  • example.com
  • sub.example.com

All requests for the subdomain for the dashboard and the site give a

403 - forbidden You don't have permission to access / on this server.

.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]

The permissions are as WordPress - strict, which work normally:

sudo find . -type d -exec chmod -R 755 {} \;; sudo find . -type f -exec chmod 644 {} \;; sudo chmod 444 wp-config.php .htaccess ; sudo chmod -R 755 wp-content ; sudo chmod -R 775 wp-content/uploads/ ; sudo chgrp -R admin . && sudo chown -R admin:www-data wp-content

I have setup subdomains on my server and pointed the document roots to the main website example.com.

I've searched for hours as to why this isn't working but can't seem to find a solution... can anyone help?

3
  • 1
    I fixed it by adding the correct path in the documentroot variable in the relevant apache conf file.
    – Jamie
    Commented Jul 22, 2017 at 21:01
  • You should add the relevant solution as an answer - it might help others in the future.
    – MrWhite
    Commented Jul 22, 2017 at 21:54
  • Does this answer your question? Subdomain multisite gives 404 on sub sites
    – bueltge
    Commented Sep 9, 2021 at 6:33

1 Answer 1

0

https://wordpress.stackexchange.com/a/135740/141068

I used the above link to correct my issue.

You can check your wildcard subdomain to be pointing to the same folder as that of the main Wordpress installation folder.

For example, if example.com is installed on public_html/example.com, *.example.com should be added to the same public_html/example.com.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.