• Hi all, my website used to work fine but had to move to another hosting company, and now I cannot get multisite to work. My database has transfered well and I see the wp and wp_2 tables. The wp is visible when you open the website, but I would like to have wp_2 as a subsite.

    I do everything that I’m supposed to do. First of all, on the top of “install network” in the WordPress dashboard it says: Warning: An existing WordPress network was detected. This is probably because I transfered the site to a new server.

    Then I do the following:

    1.Add the following to your wp-config.php file above the line reading /* That’s all, stop editing! Happy publishing. */:

    define( ‘MULTISITE’, true );
    define( ‘SUBDOMAIN_INSTALL’, false );
    define( ‘DOMAIN_CURRENT_SITE’, ‘https://lentheman.com’ );
    define( ‘PATH_CURRENT_SITE’, ‘/’ );
    define( ‘SITE_ID_CURRENT_SITE’, 1 );
    define( ‘BLOG_ID_CURRENT_SITE’, 1 );

    2. Add the following to your .htaccess file, replacing other WordPress rules:

    RewriRewriteEngine On
    RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    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]

    Every time i enter these lines of code my site breaks. It either says “database error” or the whole URL gets screwed up with multiple https://https in the name.

    I have tried countless tutorials. Maybe I’m missing something. Happy to give an expert access to my files as I just want it fixed. Any help is greatly appreciated. Thanks in advance!

    • This topic was modified 2 years, 9 months ago by lennythenanny. Reason: Format was not good
    • This topic was modified 2 years, 9 months ago by lennythenanny. Reason: Formatting
Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator bcworkz

    (@bcworkz)

    The value of constant ‘DOMAIN_CURRENT_SITE’ should be just you domain name, not the https://.

    It’s unclear how you migrated. Your original wp-config.php and .htaccess should have been migrated as well. You’d need to do some alterations related to the new DB credentials, but the new network setup steps should not be necessary since they should have been already in place. But your original working site couldn’t have had https:// as part of the domain value.

    Anyway, hopefully the https:// correction alone will solve your trouble. If not, what else is wrong should become clear based on what problems remain.

    Thread Starter lennythenanny

    (@lennythenanny)

    Thanks a lot for your response. I followed your instructions and now I get “Error establishing a database connection” as you can see. Any suggestions?

    Moderator bcworkz

    (@bcworkz)

    Confirm you’ve provided all the proper DB credentials (‘DB_PASSWORD’ value, etc.) in wp-config.php. If you’re sure they are all correct, the problem is then external to WP and you’ll likely need your host’s assistance to correct the problem.

    Thread Starter lennythenanny

    (@lennythenanny)

    Everything is correct. It happens because of the following line:

    define( ‘MULTISITE’, true ); –> if I put this to “false”, the website works again (just not as a multisite).

    I contacted DreamHost (my hosting company) but they say they cannot support with multisite. Is there any other recommendation you have? Or maybe you want to have a look yourself? I would appreciate that!

    Thread Starter lennythenanny

    (@lennythenanny)

    After a lot of trial and error, at least I got the network set up. What did the trick for me, was removing the https:// in the “domain” column in the wp_blogs table.

    • This reply was modified 2 years, 9 months ago by lennythenanny.
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘An existing WordPress network was detected. Can’t get multisite to work’ is closed to new replies.