WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Network admin links wrong (8 posts)

  1. losgaz
    Member
    Posted 1 year ago #

    I have invoked multisite on an existing local site. WP resides in
    localhost/LOSTest/barman/
    The existing site and its admin still works correctly. Admin is in at localhost/LOSTest/barman/wp-admin

    The links for the Network admin resolve to localhost/LOSTest/wp-admin/network which obviously doesn't exist.

    my config resides in localhost/LOSTest/ and contains
    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'localhost');
    define('PATH_CURRENT_SITE', '/LOSTest/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    htaccess is also in localhost/LOSTest/ and is

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /LOSTest/barman/
    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).*) barman/$2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ barman/$2 [L]
    RewriteRule . index.php [L]
    </IfModule>
    
    # END WordPress

    I have spent many hours looking at similar topics but nothing seems to work.

    Can anyone help please?

  2. The links for the Network admin resolve to localhost/LOSTest/wp-admin/network which obviously doesn't exist.

    Then why this?

    define('PATH_CURRENT_SITE', '/LOSTest/');

    If WP is installed in /LOSTest/barman, then that should be the same.

  3. losgaz
    Member
    Posted 1 year ago #

    That what was suggested on the Network setup - if I change that to anything else I get the:-
    Error establishing a database connection

    In fact if I remove that line and the define('DOMAIN_CURRENT_SITE', 'localhost'); nothing seems to change - the existing site worls and the network admin links are still wrong.

  4. Does localhost/LOSTest/barman/wp-admin/network work?

  5. losgaz
    Member
    Posted 1 year ago #

    That gets into the network admin page but the links to edit the site are incorrect. Also the Add New link is incorrect.

    I can go direct to localhost/LOSTest/barman/wp-admin/network/site-new.php
    but the post action url is also incorrect (no 'barman').

  6. Can you reinstall? I wonder if it's a botched install.

  7. losgaz
    Member
    Posted 1 year ago #

    I've tried that - exactly the same result.

  8. losgaz
    Member
    Posted 1 year ago #

    Have now done a vanilla reinstall and all is now ok. As I was installing the network I noticed the message about mod_rewrite which I had obviously missed previously. I activated that this time, so that may be why it wasn't working properly before.

    Just a thought - could perhaps a fix be made to throw an error if the module is not enabled?

    Thanks for your time.

Topic Closed

This topic has been closed to new replies.

About this Topic