WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

New WordPress 3.5.2 multisite (subdirectory) install is missing a slash when creating new blogs.

WordPress is installed to server like:


When a new user registers, the conformation email has the URL for their blog like:

blogs.domain.comnewuser (missing the / between the domain and blog name).

From Network Admin, I can edit the site, adding a / to either the end of the Domain field or the begining of the Path field and the site can be accessed:



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

Adding $base = '/'; to wp-config didn't seem to make a difference.


define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'blogs.domain.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);


wp_site has:

domain: blogs.domain.com path: /

wp_blogs has:

domain: blogs.domain.com path: /

but when a new user/blog is added, wp_blogs gets:

domain: blogs.domain.com path: user/

share|improve this question
WPMU Ldap Auth plugin is being used also. – ClevelandState Aug 3 '13 at 13:25
up vote 0 down vote accepted

WPMU Ldap Authentication was causing the incorrect URL issue. Disabling the plugin allowed users/sites to be created correctly.

This site has a fix for the plugin that allows it to run properly in WP 3.5.2: http://www.fotan.net/wpmu-ldap-plugin-fixes/

share|improve this answer

do not blame the .htaccess file.

Edit wpmuldap/lib/wpmu_ldap.functions.php

$domain = strtolower( wp_specialchars( $newUserName ) );
    if( constant( "VHOST" ) == 'yes' ) {
        $newdomain = $domain . "." . $current_site->domain;
        $path = '/' . $base;
    else {
        $newdomain = $current_site->domain;
        $path = '/' . $base . $domain . '/';

Notice that I modified the $path variable adding a leading / using: " '/' . " Right after that everything works fine.

I am using WP 3.9.1 with WPMU Ldap Authentication ver 4.0.2 using "Network" mode.

share|improve this answer
NEVER change core files or theme/plugin files if you are not the author – Pieter Goosen Jul 22 '14 at 5:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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