• Resolved Clivesmith

    (@clivesmith)


    I am using wordpress with bbpress, I wanted to go back to old topic posts and fill in the meta description where it is missing, I have to many posts to want to do each one indevidually, so I thought I could go to sql and do it using the following.

    UPDATE wp_yoast_indexable
    SET description = CONCAT(‘some text that I want to show ‘, breadcrumb_title)
    WHERE object_sub_type = ‘topic’
    AND description IS NULL
    AND breadcrumb_title LIKE ‘test_post%’;

    When I checked the table wp_yoast_indexable, all the information was there, but it does not show up when I go to a topic (post), if I change the meta description in the post it changes the description field in wp_yoast_indexable.
    Any ideas what I am doing wrong please

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

    (@maybellyne)

    Hello @clivesmith

    Thanks for using the Yoast SEO plugin.

    Meta descriptions are stored in two locations – the wp_postmeta where meta_key is _yoast_wpseo_metadesc and post_id equals the post ID and the?description?field in?wp_yoast_indexable?table.

    Can you please try the following:

    1. Install & activate the Yoast Test Helper plugin
    2. Go to Tools > Yoast Test
    3. Locate the Yoast SEO section and click on the ‘Reset indexables tables & migrations‘, ‘Reset Prominent words calculation‘, and ‘Reset Internal link counter‘ buttons. After each click, the page will reload to confirm that the specific reset was successful.
    4. Go to SEO > Tools, and under SEO data, click the “Start SEO data optimization” button to allow Yoast to rescan your content.

    Do let us know how it goes.

    Thread Starter Clivesmith

    (@clivesmith)

    Hi @maybellyne, thank you for replying, I got as far as step 4, but I am running this test on a local version of my site, I got “SEO data optimisation is disabled for non-production environments”. so I cannot run it. it has also removed all the records from wp_yoast_indexable. I obviously do not want to run this on my live website.

    Plugin Support Maybellyne

    (@maybellyne)

    You’re correct; running the SEO data optimization analysis is disabled for staging sites. Since?v15.1?of the Yoast SEO for WordPress plugin, for non-production sites, the indexables/SEO data optimization process should be prevented by default unless bypassed. You can read more of it here –?https://yoast.com/yoast-seo-15-1/.

    Also, 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.

    Since meta descriptions are stored in two tables (?wp_postmeta? and wp_yoast_indexable ), the first value is used in the backend (post edit screen) while the second value is used in the frontend. The expectation is that after resetting the indexables table, data in wp_postmeta?will be moved to wp_yoast_indexable. You may consider running your SQL query on the wp_postmeta table instead.

    Thread Starter Clivesmith

    (@clivesmith)

    Thank you,

    If I inject the records into the postmeta will it automatically update to the yoast_indexable?

    Clive

    Thread Starter Clivesmith

    (@clivesmith)

    I tried using the wp_postmeta with this, but that does not work either, is there a way I can add meta description to lots of records in one go or do I need to do each one individually ?

    INSERT INTO wp_postmeta (post_id, meta_key, meta_value)
    SELECT ID, ‘_yoast_wpseo_focuskw_text_input’, ‘not sure what this will do’
    FROM wp_posts
    WHERE post_type = ‘topic’
    AND NOT EXISTS (
    SELECT *
    FROM wp_postmeta
    WHERE post_id = wp_posts.ID
    AND meta_key = ‘_yoast_wpseo_focuskw_text_input’
    );
    INSERT INTO wp_postmeta (post_id, meta_key, meta_value)
    SELECT ID, ‘_yoast_wpseo_focuskw’, ‘not sure what this will do’
    FROM wp_posts
    WHERE post_type = ‘topic’
    AND NOT EXISTS (
    SELECT *
    FROM wp_postmeta
    WHERE post_id = wp_posts.ID
    AND meta_key = ‘_yoast_wpseo_focuskw’
    );

    Plugin Support Maybellyne

    (@maybellyne)

    You can use the bulk editor feature in WordPress > Yoast SEO > Tools > Bulk Editor > description

    Thread Starter Clivesmith

    (@clivesmith)

    Hi,

    Thank you, but that only seems to work on pages, I am using bbpress and I want to change the topics, which do not show up.

    Regards

    Clive

    Plugin Support Maybellyne

    (@maybellyne)

    Sadly, the bulk editor is only available to change the SEO title and meta descriptions in bulk. It doesn’t apply to other content types from third-party plugins

    Thread Starter Clivesmith

    (@clivesmith)

    OK, thank you for your time, I guess I will need to think about changing the meta description 1 at a time.

    Regards

    Clive

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘updating meta description’ is closed to new replies.