Sitemap XML 404 on local.
sitemap_index.xml is not working nor the child sitemaps.
Tried to disable the feature for sitemap and enable without success. Tried to reinstall Yoast SEO without success.
Tested on a real server, working as it should so it’s something either in Yoast latest 14.0.x or Local which isn’t making the plugins not playing nicely together.
I use Local by Flywheel (v5.4.1+3311) and haven’t had a moment to look into why the rules aren’t working lately. They used to work but had to switch to localhost:port option because the domain.tld option wasn’t working.
That said, I fixed it (per site so not a great solution) by adding the NGINX rules (here) to the {Path_To_Local_WordPress}/conf/nginx/site.conf file.
It took a little trial and error but I found that it works when added between the WordPress and static rules, like so (screenshot):
If this doesn’t work, it does confirm that the Local environment does not have the correct rules which is why the parameter works but the pretty permalink doesn’t. Flywheel should be able to help you figure out where to put the rules in your setup. Hope this helps!