Saša
Forum Replies Created
-
Problem is in the priority because Yoast itself uses this filter. You should increase default prio to higher (eg. default 10 -> 20 or even higher) to avoid conflicts with other code/plugins:
add_filter('wpseo_canonical', 'xxxxxxxxxxxx', 20);
https://developer.wordpress.org/reference/functions/add_filter/The fastest way is to add them into .htaccess (Litespeed works on same way as apache). You can check with your host if there are some tool on control panel or you can use some plugin (eg. Redirection) or you can buy Yoast SEO premium.
I’ll try to quickly answer in couple tips:
- Make sure that both WordPress and Site URLs point to correct secure URLs – https://wordpress.org/support/article/changing-the-site-url/
- Purge all cache which you have installed (I see LiteSpeed cache, but maybe there is other caching)
- Divi themes/builder force deprecated Yoast’s sitemap cache (into transients – disabled by default into Yoast) – https://yoast.com/help/sitemap-does-not-update/:
Please disable the sitemap feature, clear cache, and enable the sitemap feature to force the sitemap to rebuild.
It looks that WordPress/Site URLs still points to
http://(non-secure) version. Sitemaps will be rendered into browser only if you access them via https://pattygajaschi.com/sitemap_index.xmlIf you use Divi theme then you should disable/enable sitemaps after changing WP/Site URLs or similar options (forcing SSL,…).
@illuminice Not directly, but I’m “contributor” on Github and I’ve created many pull requests there. I know well Yoast codebase,… I’m trying to support WP/Yoast community when I have spare time.
One of my clients had similar issue (but only pages were affected) with BuddyPress/GamiPress. If same URL works, but after N hours it doesn’t work then I don’t think that Yoast is cause. Some issues on github are related to “plugin update” where “wrong rewrite rules” are saved during update process.
I’ve created custom plugin which logs all 404s (together with WP query details) + all changes related to rewrite rules. After couple weeks we were able to find exact root of cause.
I still can’t conclude more details.
When you see “false 404” did you try to “flush rewrite rules” (Settings ➔ Permalinks ➔ just click on save) and refresh same URL? Also, you can try PHP snippet from https://wordpress.org/support/topic/recurring-404-error-for-all-pages-but-not-posts-or-bbpress-topics/ which will do same.
You can try to temporary remove line which adds the filter pre_handle_404(the method register_hooks in wordpress-seo/src/integrations/front-end/handle-404.php ). If it works then some plugins use/add feeds on wrong way. I’ve created this class and I may help in this case.
@illuminice I agree that’s very hard to debug it. I didn’t understand from previous comments:
- Are there any pattern related to 404 errors (only pages, posts, taxonomies, feeds,…) ?
- Can you send list of installed plugins? What is object cache (Redis,Memcache,…)?
I had an issue with buddypress – https://buddypress.trac.wordpress.org/ticket/6448, but it was very hard to find out correct root of cause.
You can see github issues/PRs (but I’m not sure that they are related):
https://github.com/Yoast/wordpress-seo/pull/17286
https://github.com/Yoast/wordpress-seo/issues/13383I’ll try to help if you send more details…
@gnuworld You can find more details (and PHP snippets) – https://github.com/Yoast/wordpress-seo/issues/387, but you need to modify these examples.
The easiest way is the filter wpseo_exclude_from_sitemap_by_post_ids which will exclude everything except products from particular product category. It should work. I never saw issues related to this filter.WP automatically creates .htaccess, but it seems that there are something which is blocking this process. You can try to upload default .htaccess into root directory of your website (it’s often public_html) by instructions from previous URL. If it doesn’t work then please contact your host. It’s an issue related to WP core and your host, nothing directly related to Yoast.
It’s possible than your website uses nginx server or .htaccess isn’t writeable (if it’s apache server – https://wordpress.org/support/article/using-permalinks/#creating-and-editing-htaccess). You should contact your host for more details (about server type). Website is behind CF, so I can’t see “server signature”.
You didn’t set pretty permalinks in WP settings – https://wordpress.org/support/article/using-permalinks/ All pages use non-pretty permalinks (?page_id=nnn) and it’s bigger issue than sitemaps.
It doesn’t make sense to add rewrite rules in .htaccess right now. When you set pretty permalinks in WP (
%postname%) then sitemaps should work without additional rules.There is an issue related to “forcing trailing slash”:
$ curl -k -i https://furlytics.com/sitemap_index.xml HTTP/1.1 301 Moved Permanently Date: Thu, 15 Jul 2021 06:22:29 GMT Server: Apache ... X-Redirect-By: WordPress ... Location: https://furlytics.com/sitemap_index.xml/ ...When I try to access via query string (
/?sitemap=1) then the sitemap index works (same for sub sitemaps).You can look https://wordpress.org/support/article/changing-the-site-url/. There are two URLs:
- WordPress Address (URL) – wordpress.mydomain.com
- Site Address (URL) – mydomainwebiste.com
It’s possible to you need to “search & replace” other URLs in DB (there are plugins for it or you can use wp-cli search-replace) and reset indexables after this change (via the Yoast Test Helper or via wp-cli yoast).
I didn’t similar behavior, but my websites run on dedicated servers.
Which is version of WP Bakery? It could be an issue with outdated version. The latest is 6.7.0 – https://kb.wpbakery.com/docs/preface/release-notes/
It’s possible that REST API (in WP Core) are disabled by some security plugin or code snippets. You can check “Site health” to see more details.
Other way to reset indexables is wp-cli if you have SSH access – https://developer.yoast.com/features/wp-cli/reindex-indexables/
It’s old code and I agree that should be improved.
However, functions _wpseo_activate and _wpseo_deactivate are called only at the installation (or manual deactivation/activation of the plugin). WP update doesn’t run these functions (I didn’t notice similar behavior with WPSC). So, I think that it isn’t root of cause of your issue.
Updating some (Yoast) options could run clear_cache too… You should try to catch when purging was triggered. WPSC offers good debug log. Depends on cache plugin (W3TC or WPSC), you should try to find out debug back-trace when this function called.