WordPress.org

Make WordPress Core

Opened 14 months ago

Last modified 11 months ago

#51004 reopened defect (bug)

New sitemaps feature work only on root site in a multisite subdirectory setup

Reported by: edemir206 Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.5
Component: Sitemaps Keywords: needs-testing
Focuses: multisite Cc:

Description (last modified by SergeyBiryukov)

Hello everyone,

I have a multisite subdirectory network installation, I can only access /wp-sitemap.xml in the “main site”, subsites shows me a 404 not found error. I don't have a subdomain setup so I can't verify if the same issue happens on this kind of setup.

To exemplify my problem, today I have:

example.com/wp-sitemap.xml (Found)
example.com/my-sub-site1/wp-sitemap.xml (Not Found)
example.com/my-sub-site2/wp-sitemap.xml (Not Found)

But I want this instead:

example.com/wp-sitemap.xml (Found)
example.com/my-sub-site1/wp-sitemap.xml (Found)
example.com/my-sub-site2/wp-sitemap.xml (Found)

I think we have a bug here, right ?

Also robots.txt lists only the main site sitemap, already found a ticket for this here: #50456

Thanks for this great addition to WordPress.

Change History (9)

#1 @SergeyBiryukov
14 months ago

  • Description modified (diff)

#2 follow-up: @desrosj
13 months ago

  • Keywords reporter-feedback added

I did some testing. Here are my findings, and I have some follow up questions.

I have a subdirectory install locally with 5.5. I created three new sites and all of them have a sitemap as expected. But, I did create them after upgrading to 5.5.

Can you try a few things @edemir206? First, have you upgraded the network in the dashboard? An admin notice usually shows in the dashboard after upgrading when database updates are required. If you have not, can you please head to site.com/wp-admin/network/upgrade.php and see if that fixes the issue?

Second, can you confirm that there are no plugins active (or network active) that may be implementing their own flavor of sitemaps? Many sitemap related plugins (including Jetpack and WordPress SEO) have deactivated the default WordPress Core implementation in favor of their own.

#3 in reply to: ↑ 2 @edemir206
13 months ago

I tried updating using site.com/wp-admin/network/upgrade.php in my dev env but still didn't work.

Maybe it has something with my setup ?

Today we are using NGINX as webserver and sunrise.php for multisite with nested folder as described from here: https://paulund.co.uk/wordpress-multisite-with-nested-folder-paths

I deadctivate all plugins and the problem still occurs.

Replying to desrosj:

I did some testing. Here are my findings, and I have some follow up questions.

I have a subdirectory install locally with 5.5. I created three new sites and all of them have a sitemap as expected. But, I did create them after upgrading to 5.5.

Can you try a few things @edemir206? First, have you upgraded the network in the dashboard? An admin notice usually shows in the dashboard after upgrading when database updates are required. If you have not, can you please head to site.com/wp-admin/network/upgrade.php and see if that fixes the issue?

Second, can you confirm that there are no plugins active (or network active) that may be implementing their own flavor of sitemaps? Many sitemap related plugins (including Jetpack and WordPress SEO) have deactivated the default WordPress Core implementation in favor of their own.

#4 @edemir206
13 months ago

  • Resolution set to worksforme
  • Status changed from new to closed

Hello,

I found my problem.

It was because I was trying to access wp-sitemap.xml in blogs already created in the previous verion of WordPress, so all I needed was a refresh on each blogs permalinks and it worked!

Thank you.

#5 @desrosj
13 months ago

  • Keywords needs-testing added; reporter-feedback removed
  • Milestone changed from Awaiting Review to 5.5.1
  • Resolution worksforme deleted
  • Status changed from closed to reopened

Thanks @edemir206, glad you were able to figure it out!

This sounds like something that should be addressed if it can be reproduced, so I am reopening.

In my testing, single site installs correctly flush the permalinks, so I'm not sure why this didn't happen for multisite. Going to do some more testing to try and reproduce.

#6 @edemir206
13 months ago

Hi,

I updated my production setup to 5.5 and the subsites sitemaps are working fine now.

I think the wp-cron took care of the wp-sitemap.xml creation.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


13 months ago

#8 @audrasjb
13 months ago

  • Milestone changed from 5.5.1 to 5.5.2

Moving to milestone 5.5.2 as we are close to 5.5.1 RC and this ticket still needs a patch.
Feel free to move it back to 5.5.1 if there is a working patch in the next couple days.

#9 @swissspidy
11 months ago

  • Milestone changed from 5.5.2 to Future Release
Note: See TracTickets for help on using tickets.