could not generate sitemap with Yoast SEO

hi,

i need help with Yoast SEO. i will get a blank page or error 404 when i clicked on the XML Setup button. Any idea how can i solve this?

imege: http://prntscr.com/7p51xw

  • Michelle Shull

    Hey there, Adam!

    First off, try resaving your Permalinks. Go to Settings > Permalinks, and hit save. If you're still using the default format (which uses an ID number instead of a post or page name in the URL) switch to a "pretty" format, like Post Name, and hit save.

    Next, review this guide from Yoast: http://kb.yoast.com/article/77-my-sitemap-index-is-giving-a-404-error-what-should-i-do

    They've also got a FAQ, if that doesn't cover it, here: http://kb.yoast.com/article/123-xml-sitemap-errors

    Let us know if these steps don't resolve your issue.

    Take care!

  • akayden

    hi @Michelle Shull,

    thank you. all of the suggestion is not working for me. Here is my .htaccess. let me know if this is correct.

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    # BEGIN W3TC Browser Cache
    <IfModule mod_deflate.c>
    <IfModule mod_headers.c>
    Header append Vary User-Agent env=!dont-vary
    </IfModule>
    AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
    <IfModule mod_mime.c>
    # DEFLATE by extension
    AddOutputFilter DEFLATE js css htm html xml
    </IfModule>
    </IfModule>
    <FilesMatch "\.(css|htc|less|js|js2|js3|js4|CSS|HTC|LESS|JS|JS2|JS3|JS4)$">
    FileETag MTime Size
    <IfModule mod_headers.c>
    Header set Pragma "public"
    Header set Cache-Control "max-age=31536000, public"
    </IfModule>
    </FilesMatch>
    <FilesMatch "\.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|SVGZ|TXT|XSD|XSL|XML)$">
    FileETag MTime Size
    <IfModule mod_headers.c>
    Header set Pragma "public"
    Header set Cache-Control "max-age=3600, public"
    </IfModule>
    </FilesMatch>
    <FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|woff|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|JSON|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|WAV|WMA|WRI|WOFF|XLA|XLS|XLSX|XLT|XLW|ZIP)$">
    FileETag MTime Size
    <IfModule mod_headers.c>
    Header set Pragma "public"
    Header set Cache-Control "max-age=31536000, public"
    </IfModule>
    </FilesMatch>
    # END W3TC Browser Cache
    # BEGIN W3TC CDN
    <FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
    <IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
    </IfModule>
    </FilesMatch>
    # END W3TC CDN
    # BEGIN W3TC Page Cache core
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^(.*\/)?w3tc_rewrite_test/?$ $1?w3tc_rewrite_test=1 [L]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteRule .* - [E=W3TC_ENC:_gzip]
    RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
    RewriteRule .* - [E=W3TC_PREVIEW:_preview]
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} =""
    RewriteCond %{REQUEST_URI} \/$
    RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
    RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" -f
    RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" [L]
    </IfModule>
    # END W3TC Page Cache core

    # WordPress SEO - XML Sitemap Rewrite Fix - for subfolder install
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^sitemap_index.xml$ /wordpress/index.php?sitemap=1 [L]
    RewriteRule ^locations.kml$ /wordpress/index.php?sitemap=wpseo_local_kml [L]
    RewriteRule ^geo_sitemap.xml$ /wordpress/index.php?sitemap=wpseo_local [L]
    RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /wordpress/index.php?sitemap=$1&sitemap_n=$2 [L]
    # END WordPress SEO - XML Sitemap Rewrite Fix

  • Michelle Shull

    Hey there, Adam!

    Let's generate a debug log.

    Open up wp-config.php, and replace the current WP_DEBUG line with the following:

    // Enable WP_DEBUG mode
    define('WP_DEBUG', true);

    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);

    // Disable display of errors and warnings
    define('WP_DEBUG_DISPLAY', false);

    @ini_set('display_errors',0);

    Visit the sitemap, then go to your wp-content folder and look for a file called debug.log. Open that up, and any PHP errors that are happening should appear there.

    Your .htaccess looks okay, as long as you haven't made any changes to the rules provided by W3TotalCache.

    Thanks!

  • akayden

    hi @Michelle Shull,

    here are the warnings

    Warning: Invalid argument supplied for foreach() in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/gravity-forms-css-themes-with-fontawesome-and-placeholder-support/gravity-forms-css-themes.php on line 57

    Warning: Invalid argument supplied for foreach() in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/gravity-forms-css-themes-with-fontawesome-and-placeholder-support/gravity-forms-css-themes.php on line 67

    Warning: Invalid argument supplied for foreach() in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/gravity-forms-css-themes-with-fontawesome-and-placeholder-support/gravity-forms-css-themes.php on line 107

  • Michelle Shull

    Hi, Adam!

    It looks as though there is an issue with this plugin: gravity-forms-css-themes-with-fontawesome-and-placeholder-support, which isn't one of ours, and I don't think it's one of the Gravity Forms plugins, either. That plugin is causing critical failures, which could explain why your sitemap can't be created.

    Can we help you with any of our products or services, or are you only having issues with other products?

    Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.