WordPress.org

Forums

[resolved] Multisite (directory) on localhost: new sites "not found" (6 posts)

  1. kalledrengennr1
    Member
    Posted 1 year ago #

    Hi all you smart people out there :-)

    I've just installed a WP multisite on my WAMP Localhost. The site itself is running fine ..but when creating a new subdirectory, it says "not found" when trying to access :-(

    My wp-config contains:

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

    My .htaccess contains:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /test5/
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . /test5/index.php [L]
    </IfModule>
    # END WordPress

    In my httpd.config I have changed:

    AllowOverride None to AllowOverride All and have have uncommented LoadModule rewrite_module modules/mod_rewrite.so.

    Nothing works! :-(

    What gives???

  2. Try 'AllowOverride Options All'

    Sometimes thats' needed.

    Did Pretty Permalinks work BEFORE you activated Multisite?

  3. kalledrengennr1
    Member
    Posted 1 year ago #

    Hi Mika,

    thanks for the reply.

    Tried the 'AllowOverride Options All' to no avail :-(

    Regarding the Pretty Permalinks, the answer is both yes and no ...but mostly no :-)

    By this I mean, that this is a WP site that has been live, where Pretty Permalinks worked just fine. Then I backed up the site and rand it on my localhost ..but here Pretty Permalinks did NOT work.

    Is there something here that is causing the problem?

    Again: thanks for the help! :-)

  4. Since you're on localhost, make a new SINGLE wp site and see if pretty permalinks work.

  5. kalledrengennr1
    Member
    Posted 1 year ago #

    Resolved...

  6. vsmarcuslewis
    Member
    Posted 9 months ago #

    I came across the same issue, but the above didn't help..

    I used a tweak by Joel Glovacki on Github, https://gist.github.com/saetia for masking my dns to use ie. localhost.dev for testing.

    I set up a multisite with subdomains on my localhost user web root and got the main site working with a dnsmasq of http://project.dev

    Everything is working nicely for the parent site, but when I create a new site then attempt to reach the dashboard or view anything on the new site I get a 404 Not Found “The requested URL / was not found on this server.” error.

    I have this within my username.conf file:

    DocumentRoot “/Users/Julius/Sites/”
    NameVirtualHost *:80

    Options Indexes MultiViews FollowSymLinks Includes
    AllowOverride All
    Order allow,deny
    Allow from all

    UseCanonicalName off
    VirtualDocumentRoot /Users/Julius/Sites/%-2+/htdocs

    and here’s my htaccess file:

    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).*) project/htdocs/$1 [L]
    RewriteRule ^(.*\.php)$ project/htdocs/$1 [L]
    RewriteRule . index.php [L]

    Did I do something wrong along the way??

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic