Good morning guys, I want to setup a wordpress multisite subdirectory hosted in DO and working with serverpilot. When I change the .htaccess and wp-config.php I can’t even login it shows a blank page, redirects from http://www.site.com/wp-admin to http://site.com and in Developer Tools appears like a error 301/302 loop. Sincerely I don’t know what is happening, ok I know it’s the first time that I setup a multisite in a VPS host, however in a shared host I can al the times setup that successfully.
So this is my .htaccess file:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
And my wp-config.php file
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'www.site.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
Thank you very much for your help :)
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
@luismiguelopes - If your site is down as a result of the .htaccess configuration, you can always backup your .htaccess (download a copy) and then delete it from your web root after commenting out the
define
lines inwp-config.php
. Once you’ve done this, refresh the page and/or attempt to accessyourdomain.ext/wp-admin
and a new .htaccess should be generated for you (if not, clicking “save” on the permalinks page will regenerate it for you).When commented out, the lines should look like:
Once you’re ready to reattempt the installation, the following should be set in
wp-config.php
Ideally,
yourdomain.ext
should be setup without thewww.
attached (as shown in the example above).For the .htaccess file, try: