hestiacp / hestiacp

Hestia Control Panel | A lightweight and powerful control panel for the modern web.
https://hestiacp.com
GNU General Public License v3.0
3.31k stars 675 forks source link

[Bug] WordPress core sitemaps not working in Nginx #4191

Closed maisondasilva closed 9 months ago

maisondasilva commented 9 months ago

Describe the bug

My site was on Apache, however I noticed that when migrating to Nginx the Sitemaps that from version 5.5 of WordPress are created automatically appear as error 404, it is possible to correct this in the WordPress and wordpress-xmlrpc template.

Reference: https://community.localwp.com/t/wp-5-5-core-sitemaps-not-working-in-nginx/21450/3

https://toggen.com.au/it-tips/getting-wordpress-5-5-sitemaps-working-with-nginx/

Tell us how to replicate the bug

open

/wp-sitemap.xml error 404

In addition, other links appear, but I believe that just one rule as stated in the link should solve the entire problem!

/wp-sitemap-posts-page-1.xml
/wp-sitemap-posts-post-1.xml
/wp-sitemap-taxonomies-category-1.xml /wp-sitemap-taxonomies-post_tag-1.xml

Which components are affected by this bug?

(Backend) Web Server (Nginx, Apache2)

Hestia Control Panel Version

1.8.11

Operating system

Ubuntu 22

Log capture

Unable to read sitemap

https://xxxx.com.br/wp-sitemap.xml Unable to fetch sitemap

Read sitemaps Sitemap Status https://xxxx.com.br/wp-sitemap-posts-page-1.xml 1 error https://xxxx.com.br/wp-sitemap-posts-post-1.xml 1 error https://xxxx.com.br/wp-sitemap-taxonomies-category-1.xml 1 error https://xxxx.com.br/wp-sitemap-taxonomies-post_tag-1.xml 1 error

sahsanu commented 9 months ago

/wp-sitemap.xml and /sitemap.xml work fine for me using Nginx only and Wordpress template

maisondasilva commented 9 months ago

Thanks for the tip, I was on the wordpress template i switched to the wordpress template and saved it again and now it works, I'll monitor it!