• Resolved duhblow7

    (@duhblow7)


    For a lack of a better term, how do I factory reset all of the SEO Frameworks metadata?

    I sometimes re-use templates and remove SEO framework. If the owner of the new site installs it all of a sudden metadata from a previous project may show up. How can I completely purge the SEO framework settings and metadata from my database? Yoast uses their own tables and you can just delete them, but it looks like SEO framework is storing data in postmeta. Any suggestions?

    • This topic was modified 4 years, 9 months ago by duhblow7.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    You can reset the site-wide SEO settings with the designated button.

    For post meta, you’ll need to delete these indexes in the {prefix}postmeta table:

    _genesis_title
    _tsf_title_no_blogname
    _genesis_description
    _genesis_canonical_uri
    redirect
    _social_image_url
    _social_image_id
    _genesis_noindex
    _genesis_nofollow
    _genesis_noarchive
    exclude_local_search
    exclude_from_archive
    _open_graph_title
    _open_graph_description
    _twitter_title
    _twitter_description

    Term metadata are stored in {prefix}termmeta, collectively under the index autodescription-term-settings.

    User metadata are stored in {prefix}usermeta, collectively under the index autodescription-user-settings.

    Everything else is stored in {prefix}options, under these indexes:

    autodescription-site-settings
    autodescription-updates-cache
    the_seo_framework_upgraded_db_version
    the_seo_framework_initial_db_version
    the_seo_framework_tested_upgrade_version

    Some of these keys are used to determine whether to alter new or outdated options. So you’ll have to clear them all if you want to prevent issues.

    Finally, you may want to consider excluding all the indexes listed above when before you create the site template. Or, leave everything to a default-state instead.

    If you’d like an interface managing these, you can use the WP Data Access plugin. Be mindful that mistakes cannot be reversed without a backup. So, make a backup!

    I hope this helps ?? Cheers!

    Thread Starter duhblow7

    (@duhblow7)

    Thanks.

    Here’s some select statements to view the SEO framework data. Change table prefixes as necessary.

    SELECT * 
    FROM  wp_postmeta
    WHERE meta_key IN ('_genesis_title', '_tsf_title_no_blogname', '_genesis_description', '_genesis_canonical_uri', 'redirect', '_social_image_url', '_social_image_id', '_genesis_noindex', '_genesis_nofollow', '_genesis_noarchive', 'exclude_local_search', 'exclude_from_archive', '_open_graph_title', '_open_graph_description', '_twitter_title', '_twitter_description');
    
    SELECT * 
    FROM  wp_termmeta
    WHERE meta_key IN ('autodescription-term-settings');
    
    SELECT * 
    FROM  wp_usermeta
    WHERE meta_key = 'autodescription-user-settings';
    
    SELECT * 
    FROM  wp_options
    WHERE option_name IN ('autodescription-site-settings', 'autodescription-updates-cache', 'the_seo_framework_upgraded_db_version', 'the_seo_framework_initial_db_version', 'the_seo_framework_tested_upgrade_version');
    

    Here are the delete statements:

    DELETE 
    FROM  wp_postmeta
    WHERE meta_key IN ('_genesis_title', '_tsf_title_no_blogname', '_genesis_description', '_genesis_canonical_uri', 'redirect', '_social_image_url', '_social_image_id', '_genesis_noindex', '_genesis_nofollow', '_genesis_noarchive', 'exclude_local_search', 'exclude_from_archive', '_open_graph_title', '_open_graph_description', '_twitter_title', '_twitter_description');
    
    DELETE
    FROM  wp_termmeta
    WHERE meta_key IN ('autodescription-term-settings');
    
    DELETE
    FROM  wp_usermeta
    WHERE meta_key = 'autodescription-user-settings';
    
    DELETE
    FROM  wp_options
    WHERE option_name IN ('autodescription-site-settings', 'autodescription-updates-cache', 'the_seo_framework_upgraded_db_version', 'the_seo_framework_initial_db_version', 'the_seo_framework_tested_upgrade_version');
    • This reply was modified 4 years, 9 months ago by duhblow7.
    Plugin Author Sybre Waaijer

    (@cybr)

    Awesome! Thank you so much for sharing the queries! We should make a plugin out of it ??

    I marked it as a feature request: https://github.com/sybrew/the-seo-framework/issues/499

    Have a wonderful day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Factory Reset all settings and metadata’ is closed to new replies.