WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] can allow multisite but stuck when adding to wp-config (12 posts)

  1. chamberlin.sam
    Member
    Posted 1 year ago #

    Here's the problem. I can get the network setup to appear but when I do step 2, (add the following to the wp-config file) there is no mention of "that's all stop editing etc....
    I've pasted it in there anyway and although the site doesn't crash, it redirects me to 127.0.0.1 and I cannot access the site. Removing the code makes everything OK but no ability to get past the network setup menu.
    I used turnkey linux WordPress edition and it's residing on a virtual machine.

    Even if I can keep the website working by having the code in a different place, I still see the network settings menu. It does say at the top there is already a network present.

    I just don't know how to get past the network setup step.

  2. You should have a couple sections like this:

    /**
     * WordPress Localized Language, defaults to English.
     *
     * Change this to localize WordPress.  A corresponding MO file for the chosen
     * language must be installed to wp-content/languages. For example, install
     * de.mo to wp-content/languages and set WPLANG to 'de' to enable German
     * language support.
     */
    define ('WPLANG', '');
    
    /**
     * 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);

    Just put Multisite below that.

  3. chamberlin.sam
    Member
    Posted 1 year ago #

    This is what I have in wp-config.php on my test site. I'm trying out the multisite on this before I move on to the REAL website. The above code IS in a wp-config-sample.php file that I have.

    Do I put it in there??

    This is the test website code wp-config

    <?php
    define('DB_NAME', 'xxxxxxxx');
    define('DB_USER', 'xxxxxxxxx');
    define('DB_PASSWORD', 'xxxxxxxxxxxxxxxx');
    define('DB_HOST', 'localhost');
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');
    
    /**
     * Auth keys removed
     */
    
    $table_prefix  = 'wp_';
    
    define('WP_SITEURL', 'http://'.$_SERVER['HTTP_HOST']);
    define('WP_HOME', 'http://'.$_SERVER['HTTP_HOST']);
    
    // WordPress Localized Language, defaults to English.
    define ('WPLANG', '');
    
    if ( !defined('ABSPATH') )
            define('ABSPATH', dirname(__FILE__) . '/');
    
    define('WP_ALLOW_MULTISITE', true);
    
    define('WP_DEBUG', false);
    
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    $base = '/';
    define('DOMAIN_CURRENT_SITE', '10.28.10.24');
    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');

    This is what the website looks like right now

    This is the REAL website wp-config.php I have not inserted the multisite code in this one. I want to see it work on the test website before I touch the REAL site.

    <?php
    define('DB_NAME', 'xxxxxxxxxx');
    define('DB_USER', 'xxxxxxxxxxxx');
    define('DB_PASSWORD', 'xxxxxxxxxxxxxxxxx');
    define('DB_HOST', 'localhost');
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');
    
    /**
     * Auth keys removed
     */
    
    $table_prefix  = 'wp_';
    
    define('WP_SITEURL', 'http://'.$_SERVER['HTTP_HOST']);
    define('WP_HOME', 'http://'.$_SERVER['HTTP_HOST']);
    
    // WordPress Localized Language, defaults to English.
    define ('WPLANG', '');
    
    if ( !defined('ABSPATH') )
            define('ABSPATH', dirname(__FILE__) . '/');
    
    require_once(ABSPATH . 'wp-settings.php');</a>

    [ Moderator note: Please don't post passwords and usernames on open forums. ]
    [Moderator Note: Please post code or markup snippets between backticks or use the code button. Or better still - use the pastebin. As it stands, your code has now been permanently damaged/corrupted by the forum's parser.]

  4. Oh.

    define('WP_SITEURL', 'http://'.$_SERVER['HTTP_HOST']);
    define('WP_HOME', 'http://'.$_SERVER['HTTP_HOST']);

    That would be possibly problematic. Why do you have that?

  5. chamberlin.sam
    Member
    Posted 1 year ago #

    It's a child theme. Could that be the problem?

  6. That's got nothing to do with your theme. Did you put those lines in the wp-config.php?

  7. chamberlin.sam
    Member
    Posted 1 year ago #

    I did not. The only thing I added was what WordPress told me to do. Multisite code from the instructions.

  8. Well. Remove those lines :) Or comment them out. I can assure you, WordPress never tells you to put that in.

    Were you using a one-click installer or something to get WP installed?

  9. chamberlin.sam
    Member
    Posted 1 year ago #

    I used turnkey Linux to install. I never added anything until trying to do the multisite instructions. I'll delete and see what happens!

  10. chamberlin.sam
    Member
    Posted 1 year ago #

    Thanks for the link. I'll follow those directions and see what happens

  11. chamberlin.sam
    Member
    Posted 1 year ago #

    I am ditching TurnkeyLinux site and going with a fresh install of Ubuntu Server and WordPress. Hard to find solutions for Turnkey

    Got multisite to add sites until you edit them and it didn't show correctly. Moving on to a more basic install.

    Thanks for the help! I really appreciate it

Topic Closed

This topic has been closed to new replies.

About this Topic