• Resolved Wanderman

    (@wanderman)


    Hello All. Have my installation up and running and now wish to re-configure to have simple sub-sites listed in their own directories.

    i.e. weblog.domain.com/blog1
    weblog.domain.com/blog2

    etc.

    Ideally I’d like to have different headers and art with the same theme layout.

    When I follow the instructions to enable multisite, I get all the way to create new site. It has:

    Site Address weblog.domain.com/wordpress/

    then the box to add my own.

    I have tried every permutation I can think of here yet I always get the error:

    Missing or invalid site address.

    HELP!

    Once I get past this I can begin the real work.

    Later on, as the blogs become more popular I will likely switch to multidomain: blog1.domain.com, blog2.domain.com. But not just yet.

    My wp-config.php is:
    define(‘WP_ALLOW_MULTISITE’, true);

    define( ‘MULTISITE’, true );
    define( ‘SUBDOMAIN_INSTALL’, false );
    $base = ‘/wordpress/’;
    define( ‘DOMAIN_CURRENT_SITE’, ‘weblog.DOMAIN.com’ );
    define( ‘PATH_CURRENT_SITE’, ‘/wordpress/’ );
    define( ‘SITE_ID_CURRENT_SITE’, 1 );# BEGIN WordPress
    RewriteEngine On
    RewriteBase /wordpress/
    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 . index.php [L]
    # END WordPress

    I am at a loss. AND I am sure this is a simple fix.

    Thanks,

    Rick
    define( ‘BLOG_ID_CURRENT_SITE’, 1 );

    and my .htaccess is:

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Wanderman

    (@wanderman)

    OK. I reinstalled wordpress in my /webroot/ directory and was able to add /webroot/weblog/ directories as distinct blogs.

    Do I still have to install an iteration of wordpress in every single blog directory??? i.e. /webroot/ has an install. Then another in /webroot/weblog1/ and /webroot/weblog2/ etc etc.?

    Is there another way?? I will be using a single mysql database and understand I will need to change each weblog to its own prefix in the config. i.e. wp- is default next one is fb- etc etc.

    I’m getting there.

    Thanks!

    Rick

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    If you want to have your URLs be weblog.domain.com/blog2 then you must install WordPress in weblog.domain.com — NOT weblog.domain.com/wordpress/

    If you install WP in weblog.domain.com/wordpress/ then all your sites will be weblog.domain.com/wordpress/site2 etc.

    There is no need to setup sub-directories or separate wordpress installs if you enable multi-site. After permalinks and multi-site are setup you will have a new option for “Network Admin” located in the top right area of your screen; clicking the arrow next to “Howdy, USERNAME” will reveal a link to the Network Admin section. From there you can add new sub-sites. From there you simply select “add new” from the Sites menu in the left column, enter the site address (this is the sub-directory name), title and email and you’re good to go.

    Here is a good page for how to enable multi-site > http://www.wpbeginner.com/wp-tutorials/how-to-enable-multi-site-option-in-wordpress-3-0/

    Hope this helps.
    Geary

    Thread Starter Wanderman

    (@wanderman)

    OK…I followed the instructions for multisite. I have a wordpress installation at the root of my webserver. I do not wish to have a separate install of wordpress in each sub-directory.

    weblog.domainname.com/

    now I want sub-directories such as:

    weblog.domainname.com/site1

    weblog.domainname.com/site2

    I have network admin activated. I have the site created. All I get when I try to go to a particular subsite is:

    404 NOT FOUND!

    HELP!

    Rich

    Thread Starter Wanderman

    (@wanderman)

    also,

    when I finally get a blog created, users added, theme enabled. I go to visit the site or the dashboard and get:

    The requested URL /NAME OF SITE/wp-admin/ was not found on this server.

    I believe it has to do with directories.

    Do i need to create a /NAME OF SITE/ directory off of the webroot?

    If I have one, it fails to find the wp-admin script. I thought that multisite allows you to use the same wordpress installation system files.

    help Again!

    Rich

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    DO NOT CREATE A DIRECTORY.

    Stop. Take a deep breath. Okay? πŸ™‚ We’re okay.

    MultiSite will create vritaul folders on your website, so weblog.domainname.com/ will be ‘Site 1’ (i.e. your main site) and weblog.domainname.com/site2 will be site 2 and so on and so forth. Make sense?

    By installing WordPress in weblog.domainname.com you have set up a single install of WordPress. You’ve activated network admin, good. Did you change your .htaccess in weblog.domainname.com?

    yes, enabling multi-site will generate code for two areas; your wp-config.php and your .htaccess file. Permalinks also needs to be configured.

    Thread Starter Wanderman

    (@wanderman)

    Thanks everyone, it is always much more frustrating to have something partially functional than simply not work at all!

    my .htaccess:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    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 . index.php [L]

    #<IfModule mod_rewrite.c>
    #RewriteEngine On
    #RewriteBase /wordpress/
    #RewriteRule ^index\.php$ – [L]
    #RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule . /wordpress/index.php [L]
    #</IfModule>

    # END WordPress

    my wp-config.php includes these lines:

    define(‘WP_ALLOW_MULTISITE’, true);

    define( ‘MULTISITE’, true );
    define( ‘SUBDOMAIN_INSTALL’, false );
    $base = ‘/’;
    define( ‘DOMAIN_CURRENT_SITE’, ‘weblog.vr-x.com’ );
    define( ‘PATH_CURRENT_SITE’, ‘/’ );
    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__) . ‘/’);

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

    I can see multisite network admin. I can add sites.

    I have no idea when one is added it does not create any virtual folders, simply shows me the path and a 404 error.

    Something basic is amiss.

    Am I configuring the new sites correctly??

    What is needed to be modified as far as permalinks are concerned?

    Thanks,

    I promise I will breat! πŸ™‚

    Rich

    Rich

    You said earlier you put wordpress in the root of your website. But by the looks of your htaccess, it’s in a directory called “wordpress” under the root.

    When you unzip the wordpress source files locally, the contents inside the “wordpress” folder should be uploaded to the root, not the wordpress folder.

    Thread Starter Wanderman

    (@wanderman)

    moon,
    I see the rewrite base is /

    and a bunch of commented out lines refer to a /wordpress/ directory.

    The install is to the webroot (/)

    Thanks!

    Rich

    oops πŸ™‚

    ok… so the install was initially in the wordpress directory then you moved it to the root?

    Did you drop all the tables in the database and re-run setup from the root. If not there are entries in the database still pointing to the initial “wordpress” directory you install in.

    I would do one of 3 things.

    1. Drop all tables and re-run setup from the root;
    2. export the database, use a text editor like notepad++ and find/replace /wordpress/ from the paths & urls; or
    3. Go into Network Admin, All Sites, Edit site, Settings and remove any reference to /wordpress/ urls and paths from there.

    G.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    http://weblog.vr-x.com/blog/2011/11/25/hello-world/ doesn’t work.

    This means your server’s not reading the .htaccess correctly. Check in your httpd.conf file and make sure it’s got AllowOverride set to ALL.

    Thread Starter Wanderman

    (@wanderman)

    EUREKA!

    I knew wordpress was configured correctly!

    Ipstenu, brilliant deduction! I had overrides set to NONE on this new server. Never went back to change it!!!

    Thanks!

    Rich

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Multisite with simple sub-directories’ is closed to new replies.