• Resolved redvivi

    (@redvivi)


    Hello,

    I am trying to generate static xml files using https://markjaquith.wordpress.com/2018/01/22/how-i-fixed-yoast-seo-sitemaps-on-a-large-wordpress-site/.

    Executing cd /srv/www/example.com && /usr/local/bin/wp eval '$sm = new WPSEO_Sitemaps;$sm->build_root_map();$sm->output();' > /srv/www/example.com/wp-content/uploads/sitemap_index.xml

    Throws:

    PHP Notice:  Undefined index: HTTP_X_FORWARDED_PROTO in phar:///home/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1169) : eval()'d code on line 72
    PHP Warning:  Invalid argument supplied for foreach() in /var/www/wordpress/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps.php on line 388
    Warning: Invalid argument supplied for foreach() in /var/www/wordpress/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps.php on line 388

    Any indication of what’s missing or how to generate those static xml files ?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter redvivi

    (@redvivi)

    I try to programmatically generate sitemap_index.xml file and its subsitemaps in one go.

    Hi,

    Yoast does not create a static sitemap xml file. The Yoast sitemaps are virtual files that get dynamically updated each time a post or page is created or is updated. We then ping search engines to come crawl the sitemap and index the new content.

    We understand you are trying to use the code on this site: https://markjaquith.wordpress.com/2018/01/22/how-i-fixed-yoast-seo-sitemaps-on-a-large-wordpress-site/ however, we can’t offer support on custom code (needed to change (core) features of our plugin). Since we don’t want to take the risk that we break your website by suggesting incorrect or incomplete code, we cannot advise you on how to make such changes. Maybe someone watching these forums can assist you further, but if your topic is inactive for 7 days, we’ll mark it as resolved to keep the overview.

    Thank you for your understanding.

    Thread Starter redvivi

    (@redvivi)

    Hi,

    I understand the way Yoast work. The problem here is that the large number of posts make Yoast’s sitemap feature unusable.
    Therefore, any advice on that matter to use Yoast in this context of large number of posts is welcome.

    Thanks.

    • This reply was modified 5 years, 6 months ago by redvivi.
    • This reply was modified 5 years, 6 months ago by redvivi.
    Plugin Support amboutwe

    (@amboutwe)

    Some larger sites find that caching the sitemaps help. To enable sitemap caching, please use the code snippet below.

    /* Enable Yoast SEO sitemap caching
     * Last Tested: Mar 27 2019 using Yoast SEO 10.0.1 on WordPress 5.1.1
     * Credit: Yoast development team
     *********
     * Please note that changes will be applied upon next sitemap update.
     * To manually create the cached sitemap, please disable and enable
     * the sitemaps then load each sitemap.
     * Once cached, Yoast SEO will update sitemap cache as needed.
     */
    add_filter('wpseo_enable_xml_sitemap_transient_caching', '__return_true');
    Thread Starter redvivi

    (@redvivi)

    Already done that and extended the transient expiration time to 30 days, which, as you may understand, is quite an impediment for regular sitemap updates.

    I do not have other conclusion other than Yoast is not scalable for large wordpress websites.

    Plugin Support devnihil

    (@devnihil)

    There is currently an issue report open with our developers regarding the sitemap performance on large sites at the following link which you may find helpful: https://github.com/Yoast/wordpress-seo/issues/12161

    Another user on the issue recommended the optimizations found in the following article for additional optimization of the sitemap on very large sites:
    https://www.wpintense.com/2019/02/04/performance-optimisation-for-various-xml-sitemap-plugins/

    Thread Starter redvivi

    (@redvivi)

    Thanks @devnihil.

    1) Do you have a fix date regarding this issue ?

    2) I saw & implemented this post, however this is not sufficient for my use-case in terms of performance.

    Plugin Support amboutwe

    (@amboutwe)

    The issue is marked as needs-investigation which means that it is on our radar to investigate. Due to a large number of issues, we have to focus on issues that either are breaking the plugin or affect many users. Since this issue is neither (yet), we probably cannot fix this short term. Unfortunately, due to capacity, we cannot give you an estimate on when this issue will be addressed.

    We encourage our users to contribute to our plugin, not just by submitting issues, but also by submitting patches. If you (or someone else) decide(s) to write a patch for this issue, we’ll gladly include it after some code review.

    Bugs are reported, investigated and fixed in GitHub so this topic was closed in favor of the open bug report. Please subscribe to the GitHub report to get updates on the investigation, to provide more information about the issue or to submit a patch to resolve the issue.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Generateing sitemaps create error’ is closed to new replies.