• Resolved Tim Nolte

    (@tnolte)


    I don’t understand why Yoast SEO insists on breaking reindexing(Optimize SEO Data) functionality on non-Production sites. When we host on platforms such as Pantheon we have no way to fix broken Yoast SEO indexes that break FacetWP facets because we can’t simply change the environment type.

    “SEO data optimization is disabled for non-production environments.”

    Is there at least a hook we can use to override this restriction?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @tnolte

    Thanks for using the Yoast SEO plugin. We disable indexables by default on sites where the core function?wp_get_environment_type()?does?not?return?production. For non-production sites, the indexables/SEO data optimization process should be prevented by default unless bypassed.

    The Yoast SEO plugin makes use of and manages an indexables table in the WordPress database where it stores all the SEO data of your website (SEO titles, meta descriptions, canonical URLs). Since Yoast SEO v15.1, this table is only processed in production environments. You can read more of it here: https://yoast.com/yoast-seo-15-1/.

    Furthermore, in WordPress 5.5, wp_get_environment_type() function was introduced. The default should have been 'production'. If this did not return true on your site, you can set the WP_ENVIRONMENT_TYPE constant to 'production' by adding the line below to the wp-config.php file.

    define( 'WP_ENVIRONMENT_TYPE', 'production' );
    You can read more about it?here.

    Thread Starter Tim Nolte

    (@tnolte)

    @maybellyne so this doesn’t really address the issue. This is not a situation where we can, or even want to change the environment type. We intentionally use Staging & Development environments for development & QA/UA testing. We need the ability to prevent Yoast SEO from disabling data optimization in non-Production environments.

    The article about the feature just simply states that Yoast made the decision to straight up prevent anl whole group of actions from running in non-Production and have given users, and in our case Developers, no choice in the matter. Disabling indexables in non-Production environments actually breaks things, and in our testing it breaks FacetWP facets from working on the frontend of sites.

    When WordPress sites are deployed via containers or environments where code and configuration can’t be changed on-the-fly without a full site build and deployment this makes Yoast SEO a terrible product to use.

    • This reply was modified 1 year, 2 months ago by Tim Nolte.
    Plugin Support Maybellyne

    (@maybellyne)

    I understand having the indexables disabled on non-production environments is undesirable for your use case. Please create a feature request on GitHub for our developers so this can be reviewed in greater detail.

    stefanfisk

    (@stefanfisk)

    Indexing can be enabled for all environment types via

    add_filter( 'Yoast\WP\SEO\should_index_indexables', '__return_true' );
    • This reply was modified 12 months ago by stefanfisk.
    Thread Starter Tim Nolte

    (@tnolte)

    @stefanfisk ah, this is perfect! Thanks for finding and sharing this!

    @stefanfisk Please let me know where I can add it, I have the same problem.

    • This reply was modified 10 months, 3 weeks ago by hafizanas1470.
    Thread Starter Tim Nolte

    (@tnolte)

    @hafizanas1470 this would be code I would generally add to a Must Use Plugin in wp-content/mu-plugins you could for example create something like the following in a file wp-content/mu-plugins/yoast-custom.php:

    <?php
    add_filter( 'Yoast\WP\SEO\should_index_indexables', '__return_true' );
    

    @tnolte It can Work Properly. Thank You Brother????

    • This reply was modified 10 months, 3 weeks ago by hafizanas1470.
    • This reply was modified 10 months, 3 weeks ago by hafizanas1470.
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Why is Reindex Disabled in Non-Production’ is closed to new replies.