Is there a way to change the default value of a node's XML sitemap enable/disable flag for the XML sitemap module?

The default is disabled. I have a large old site that I want to have completely site-mapped by the module. The documentation I can find says I need to edit every node to enable -- there has to be an easier way.

Barring that, is there a Drush command available for it?


You seem to be asking 2 things.

The default inclusion status for nodes is set on the node type's edit page (admin/structure/types/manage/MYTYPE). The XMLSiteMap settings are stored as xmlsitemap_settings_node_MYTYPE in keyed array (status key) if you'd rather drush vset the setting.

As for bulk inclusion, the xmlsitemap table stores all items index for inclusion/exclusion in your site map. A drush sqlq command can bulk update these settings.

#Set all XMLSiteMap node entries as included
drush sqlq 'UPDATE xmlsitemap SET `status` = 1 WHERE `type` = "node"'
drush xmlsitemap-rebuild

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.