WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] database name showing up in new site url (8 posts)

  1. elanbailey
    Member
    Posted 4 years ago #

    Hi all,

    I've just installed (or actually re-installed) version 3.0.1 and set up my network using the sub-directory option.

    Whenever I add a new site it includes the database name in between the site name and the site sub-directory.

    So my url appears as:

    http://wwww.mysitename.comdbnametest-1/

    instead of:

    http://www.mysitename.com/test-1/

    I've uninstalled, set up a new database and tried following the WP-config and .htaccess configurations to the letter, but I can't figure out how to change this.

    I was very comfortable with configuring WPMU over the last year, but am still trying to get my head around the create a network configuration and would appreciate your help.

    Thanks

  2. Did you use Dreamhost's One Click install? If so, that;s why.

    Go look in wp-config.php, near the bottom. If there is a $base line with your database name in it, remove it.

  3. elanbailey
    Member
    Posted 4 years ago #

    Thanks Andrea,

    Yes I used DH one-click.
    I don't see the $base line though.

    Here are the contents of my wp-config

    <?php
    /** WordPress's config file **/
    /** http://wordpress.org/ **/

    // ** MySQL settings ** //
    define('DB_NAME', 'dbname'); // The name of the database
    define('DB_USER', 'dbuser'); // Your MySQL username
    define('DB_PASSWORD', 'dbpw'); // ...and password
    define('DB_HOST', 'dbhost.mysitename.com'); // ...and the server MySQL is running on

    // Change the prefix if you want to have multiple blogs in a single database.

    $table_prefix = 'wp_dsuju0_'; // example: 'wp_' or 'b2' or 'mylogin_'

    // Turning off Post Revisions. Comment this line out if you would like them to be on.

    define('WP_POST_REVISIONS', false );

    // Change this to localize WordPress. A corresponding MO file for the
    // chosen language must be installed to wp-includes/languages.
    // For example, install de.mo to wp-includes/languages and set WPLANG to 'de'
    // to enable German language support.
    define ('WPLANG', '');

    define('WP_ALLOW_MULTISITE', true);

    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'mysitename.com' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    define( 'AUTH_KEY', 'GIo_[Yy?OrNN_i$6u}.35|+r|uOj}FTf}^D9U3HYR:xWp_+3$-GO+*-gD!y=7HP$' );
    define( 'SECURE_AUTH_KEY', 'P~U-U!_vnbKC>vx/{?<1k2/M=BqMlYW5Xnbnb6V o1_u6w{5DH4ey6rgxU+7LQ#Z' );
    define( 'LOGGED_IN_KEY', 'HX<L[,s`w-rOB}AoF8?q[57%OX&k+EAR=$;a{|r6D(Br8~PuIW(j_/[8c@sK?-uR' );
    define( 'NONCE_KEY', 'ebif g~M_w:?_NP-wH-]G@cyn0TXI*xiJcWV+3y2&ZQgUcqLlF>X5l=4*$6Ddp' );
    define( 'AUTH_SALT', 'o 6|45sC]i!isZo5hdmm)Ls5P8/OvtzZf-8jx0<_[&xZ:Y41Aog}:np(4#!h~J=m' );
    define( 'SECURE_AUTH_SALT', 'eO)_aCaT}U>D[vL4&dQ#H[nEiN_co/>]O5Q3F]4E>_ht+m@VdM>cx:e>`l^qZ6' );
    define( 'LOGGED_IN_SALT', '^0 L~vap+s.*R)-i<uG@D$>[:D?7>Gdf}+BZ[r:~Cs9Mao5%rcRwGd@|>!k0YH' );
    define( 'NONCE_SALT', 'XZknyOc/4|+.!}/UnXl*OlP-nDm6|$>b13%0-nweBlU_!)t/zb6P>XB_^)+U aX3' );

    /* Stop editing */

    $server = DB_HOST;
    $loginsql = DB_USER;
    $passsql = DB_PASSWORD;
    $base = DB_NAME;

    if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__).'/');

    // Get everything else
    require_once(ABSPATH.'wp-settings.php');
    ?>

  4. elanbailey
    Member
    Posted 4 years ago #

    spoke to soon, sorry.
    Are you referring to this line:

    $base = DB_NAME;

    should I remove the whole line
    $base = DB_NAME;

    I also notice an earlier line that reads:
    $base = '/';

    is this line okay

  5. take out this line:

    $base = DB_NAME;

    leave this one:

    $base = '/';

  6. elanbailey
    Member
    Posted 4 years ago #

    Thanks.

    I'm having a new problem now and I'm not sure if its related to having made that change in my config file.

    Now when I create new sites I see them in the back-end super admin panel. And I can navigate directly to each site using the url.
    But when I visit or login to the front end of my network I have no links or menu items that allow me to visit my blogs. And the persistent navigation that used to appear at the top is no longer there.

    If this is unrelated, I'll create a new topic thread. But as far as I recall the problem only started after I changed the wp-config file.

    Wow, the designated MU seemed a lot more straightforward than this

  7. elanbailey
    Member
    Posted 4 years ago #

    In my prior 3.0.1 install I noticed the newly created blog.dir would create a new sub-folder everytime I added a new blog.

    Now that folder is empty and it doesn't matter how many blogs I add, no sub-folders are being added here.

  8. But when I visit or login to the front end of my network I have no links or menu items that allow me to visit my blogs. And the persistent navigatio

    n that used to appear at the top is no longer there.

    Whatever you had for a navigation at the top was a plugin. No links to your other blogs will show unless you do something to put them there.

    In my prior 3.0.1 install I noticed the newly created blog.dir would create a new sub-folder everytime I added a new blog.
    Now that folder is empty and it doesn't matter how many blogs I add, no sub-folders are being added here.

    The blogs do not live in those folders. they only hold uploaded media files.

    upload a picture to one of the blogs and the folders you remember seeing will show up.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.