• After preparing the site on localhost, I uploaded it on server. Everything works fine by adding both lines to define WP_HOME and WP_SITEURL on wp-config.php and replacing the url site in the database tables. Then I decided to create a multisite network (subdomains) using WordPress Multi-Site Enabler Plugin. An old plugin but worked well with another website created directly online.
    In this case, I got a redirection to the localhost/oldlocalwebsite.com/ everytime I try to login.
    This is what was added by the plugin in wp-config.php:

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

    and in the .htaccess file:

    #Made Multi-Site with Multi-Site Enabler 1.5#
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    
    RewriteRule . index.php [L]

    By the way I’ve already done this twice manually and I got 500 error.

    Any help please ? Thanks.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Redirect to localhost after installing Multisite on server’ is closed to new replies.