I am attempting to create a multisite as a subdirectory and I have followed the network instructions to the ‘T’. The multisite seems to be set up correctly, the .htaccess and wp-config.php files seem correct and I was able to do a network setup, however when I go to my multisite page it comes up with a 404 error – Not found. This also then prevents me from logging into the admin side for this site.

My main site still works fine and I able to login to the admin side there and with help from a plugin I can access and manipulate the database. All newly created tables are there, the multisite URL and options all seem correct.

I’ve verified the .htaccess file matches what’s in WordPress.
I’ve verified the appropriate location of .htaccess (public_html root) and it is writeable. We don’t believe this is a permalinks problem as so much of my research has suggested.

After extensive research I was unable to find a solution, any help is appreciated.

Here is my .htaccess file:

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

and the end of my config file:

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 */
define('WP_DEBUG', false);

/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'www.mybusinessconnect.com.au');
define('PATH_CURRENT_SITE', "https://wordpress.stackexchange.com/");
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

/* That's all, stop editing! Happy blogging. */

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . "https://wordpress.stackexchange.com/");

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

5 s
5

I had the axact same problem.

My solution: edited/etc/apache2/sites-enabled/000-default.conf. It needs to look like:

<VirtualHost *:80>

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        <Directory />
                Options FollowSymLinks
                AllowOverride all
        </Directory>
        <Directory /var/www/>
                Options FollowSymLinks
                AllowOverride all
                Order allow,deny
                allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

It works!

Leave a Reply

Your email address will not be published. Required fields are marked *