Problem with Wordpress multisite

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Problem with Wordpress multisite

Postby dafaher » 13. May 2021 01:15

Good evening, community! I'm sorry to bother you guys. I'm developing a project locally with Wordpress and I tried to install a multisite 7 times, but it's impossible and I wonder if maybe Xampp could be somehow linked to this problem. You see, I followed the official documentation to the letter, and in fact I did it several times in the past with no problems. WordPress confirms the creation of the network and makes me log in again. After logging in again, I created the new site and I can see it in the Sites list:

https://drive.google.com/file/d/1oJ8AaMpPXMB_BEhKv1q-eKAn4UpUSK7n/view?usp=sharing

But in the top menu of the desktop it doesn't appear:

https://drive.google.com/file/d/1LQbg2oFeyXpqnXkmoKq3HQZSdN2MieHD/view?usp=sharing

If I try to visit the site, I can see a blank page with links, but the CSS, JS and everything else seems to be broken. Chrome's developer tool shows 21 entries with error 403 (forbidden), but all folders have the default permissions, so I feel pretty lost:

https://drive.google.com/file/d/1yyfnt0lRvQE_0qqUh4KB9b5iG0fRP2Ty/view?usp=sharing

I also can't go to the desktop of the new site because it also shows me error 403. I don't know what to do anymore. Just in case, it's a clean installation, I've been using Xampp 7.4.18 (I just updated it to 7.4.19 because it was released yesterday, and the same is still happening) and the latest version of WordPress. I activated the Wordpress debugger, but the debug.log file was not generated, it's weird. Do you have any idea about what could be causing this problem? Thank you very much in advance!
dafaher
 
Posts: 13
Joined: 06. August 2015 21:00
XAMPP version: 7.4.19-0
Operating System: Windows 8.1 Pro - 64 bits

Re: Problem with Wordpress multisite

Postby Altrea » 14. May 2021 06:32

Hi,

Sorry, i cannot reproduce your issue.
  • I have installed a fresh XAMPP 7.4.19-0
  • I installed a fresh wordpress 5.7.2
  • i activated and configured multisite
  • i added a site

That's the result:
Image

If i visit the site i don't have any 40X errors.
Image

Maybe you did something wrong by editing the .htaccess file!?

For comparison:

This is what i added to my wp-config.php
Code: Select all
/**
 * Wordpress Multisite Configuration
 *
 *
 */
define( 'WP_ALLOW_MULTISITE', true );

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', '127.0.0.1');
define('PATH_CURRENT_SITE', '/factorpsi/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);


And this is my .htaccess
Code: Select all
# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /factorpsi/
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]
</IfModule>

# END WordPress
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11933
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Problem with Wordpress multisite

Postby dafaher » 14. May 2021 12:29

@Altrea, thank you very much for all that work to reproduce the issue!

I compared your copies of .htaccess and wp-config.php with mine, and noticed that I was missing two lines: <IfModule mod_rewrite.c> and </IfModule>. I followed the official instructions and they said that everything between #BEGIN WordPress and #END WordPress had to be removed, and I took it very literally without paying attention to those two lines. The problem has already been solved and everything works perfectly, so I thank you very much for your time and assistance. Have an excellent day, and best regards from Buenos Aires!
dafaher
 
Posts: 13
Joined: 06. August 2015 21:00
XAMPP version: 7.4.19-0
Operating System: Windows 8.1 Pro - 64 bits

Re: Problem with Wordpress multisite

Postby Altrea » 14. May 2021 17:53

dafaher wrote:I compared your copies of .htaccess and wp-config.php with mine, and noticed that I was missing two lines: <IfModule mod_rewrite.c> and </IfModule>. I followed the official instructions and they said that everything between #BEGIN WordPress and #END WordPress had to be removed, and I took it very literally without paying attention to those two lines. The problem has already been solved and everything works perfectly, so I thank you very much for your time and assistance. Have an excellent day, and best regards from Buenos Aires!

Glad you got it working. I am very sure these two lines are not the reason for this issue. Maybe it was a Browser/Webapplication cache issue or something like that.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11933
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Problem with Wordpress multisite

Postby dafaher » 14. May 2021 23:15

You know, reading the code again, there are two differences between your settings and the ones that Wordpress suggested to me from the "network settings" option. I'd like to share it here in case someone else has a similar problem:

Your .htaccess file and mine are exactly the same. But there are two differences between your wp-config.php file and mine.

Yours near the end says:

RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]

And mine says:

RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) C:/xampp/htdocs/MYWEB/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ C:/xampp/htdocs/MYWEB/$2 [L]

Maybe the path wasn't needed and that's why it didn't worked. The strange thing is that this is the code that Wordpress suggested me, I didn't write it. Very strange!
Again, thank you very much for your help and support, happy weekend!
dafaher
 
Posts: 13
Joined: 06. August 2015 21:00
XAMPP version: 7.4.19-0
Operating System: Windows 8.1 Pro - 64 bits


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 144 guests