Yoast - Automatisering

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen

Alles rondom automatisering van Yoast. Oftewel: beheer van Yoast buiten de web-interface om.

Context van dit artikel (2021.08):

  • Uitsluitend de gratis variant van Yoast
  • Een handjevol WooCommerce-webwinkels met elk duizenden artikelen, in verschillende talen.

wp yoast index

Yoast biedt slechts één WP-CLI commando: Om de index op te bouwen. Ik heb de indruk dat het niet werkt: Het was instantaan klaar, terwijl de webinterface er uren over lijkt te doen - Misschien snap ik iets niet.

wp options

Enige algemene instellingen lijken te worden bijgehouden in wp_options. custom_taxonomy_slugs lijkt het enige relevante onderdeel hiervan te zijn tav. klonen & vertalen. Wordt dit niet bijgewerkt als je de Yoast-index bijwerkt?

$ wp option get wpseo


array (
  'tracking' => false,
  'license_server_version' => '2',
  'ms_defaults_set' => false,
  'ignore_search_engines_discouraged_notice' => false,
  'indexing_first_time' => false,
  'indexing_started' => 1626764628,
  'indexing_reason' => 'permalink_settings_changed',
  'indexables_indexing_completed' => true,
  'version' => '16.8',
  'previous_version' => '16.7',
  'disableadvanced_meta' => true,
  'enable_headless_rest_endpoints' => true,
  'ryte_indexability' => true,
  'baiduverify' => '',
  'googleverify' => '',
  'msverify' => '',
  'yandexverify' => '',
  'site_type' => 'shop',
  'has_multiple_authors' => false,
  'environment_type' => 'production',
  'content_analysis_active' => true,
  'keyword_analysis_active' => true,
  'enable_admin_bar_menu' => true,
  'enable_cornerstone_content' => true,
  'enable_xml_sitemap' => true,
  'enable_text_link_counter' => true,
  'show_onboarding_notice' => false,
  'first_activated_on' => 1559309841,
  'myyoast-oauth' => false,
  'semrush_integration_active' => true,
  'semrush_tokens' => 
  array (
  ),
  'semrush_country_code' => 'us',
  'permalink_structure' => '/%postname%/',
  'home_url' => 'http://en.s1',
  'dynamic_permalinks' => false,
  'category_base_url' => '',
  'tag_base_url' => '',
  'custom_taxonomy_slugs' => 
  array (
    'product_type' => 'product_type',
    'product_visibility' => 'product_visibility',
    'product_cat' => 'shop',
    'product_tag' => 'product-tag',
    'product_shipping_class' => 'product_shipping_class',
    'pa_example' => '/example',
    ...
    'pa_example_100' => '/example_100',
  ),
  'enable_enhanced_slack_sharing' => true,
  'zapier_integration_active' => true,
  'zapier_subscription' => 
  array (
  ),
  'zapier_api_key' => '',
  'enable_metabox_insights' => true,
  'enable_link_suggestions' => true,
  'algolia_integration_active' => false,
)

wp post meta

Een aantal velden worden bijgehouden als wp post meta-velden. Oftewel regels in tabel wp_post_meta.

Voorbeeld (dit betreft een WooCommerce-producte):

$ wp post meta list 55272

+---------+----------------------------------+-----------------------------------------------------------------------+
| post_id | meta_key                         | meta_value                                                            |
+---------+----------------------------------+-----------------------------------------------------------------------+
| 55272   | _sku                             | ca-123                                                                |
| 55272   | _regular_price                   | 79.95                                                                 |
| 55272   | total_sales                      | 6                                                                     |
| 55272   | _tax_status                      | taxable                                                               |
| 55272   | _tax_class                       |                                                                       |
| 55272   | _manage_stock                    | no                                                                    |
| 55272   | _backorders                      | no                                                                    |
| 55272   | _sold_individually               | no                                                                    |
| 55272   | _virtual                         | no                                                                    |
| 55272   | _downloadable                    | no                                                                    |
| 55272   | _download_limit                  | -1                                                                    |
| 55272   | _download_expiry                 | -1                                                                    |
| 55272   | _thumbnail_id                    | 53057                                                                 |
| 55272   | _stock                           |                                                                       |
| 55272   | _stock_status                    | instock                                                               |
| 55272   | _wc_average_rating               | 0                                                                     |
| 55272   | _wc_review_count                 | 0                                                                     |
| 55272   | _product_attributes              | <weggehaald>                                                          |
| 55272   | _product_version                 | 4.4.1                                                                 |
| 55272   | _price                           | 79.95                                                                 |
| 55272   | sku_oem                          | 3775                                                                  |
| 55272   | _sku_oem                         | field_5cc47ea230d51                                                   |
| 55272   | diagram                          |                                                                       |
| 55272   | _diagram                         | field_5cc58bd920d9b                                                   |
| 55272   | post_tools                       |                                                                       |
| 55272   | _post_tools                      | field_5ce5246bc13fe                                                   |
| 55272   | _yoast_wpseo_focuskw             | Widgets voor Zbigniew                                                 |
| 55272   | _yoast_wpseo_linkdex             | 28                                                                    |
| 55272   | _yoast_wpseo_content_score       | 60                                                                    |
| 55272   | _yoast_wpseo_primary_product_cat | 44352                                                                 |
| 55272   | dhlpwc_enable_method_limit       |                                                                       |
| 55272   | dhlpwc_selected_method_limit     |                                                                       |
| 55272   | _edit_lock                       | 1627985827:4                                                          |
| 55272   | _edit_last                       | 9                                                                     |
| 55272   | _last_editor_used_jetpack        | classic-editor                                                        |
+---------+----------------------------------+-----------------------------------------------------------------------+

Dit lijken alle Yoast-velden bij elkaar te zijn:

  • _yoast_wpseo_focuskw
  • _yoast_wpseo_linkdex
  • _yoast_wpseo_metadesc
  • _yoast_wpseo_content_score
  • _yoast_wpseo_primary_product_cat.

Hiervan zijn alleen deze beschrijfbaar:

  • _yoast_wpseo_focuskw
  • _yoast_wpseo_metadesc.

Ik weet niet wat _yoast_wpseo_primary_product_cat is.

Tabel wp_yoast_indexable

Een handjevol van de velden:

Veld Opmerkingen
object_id Foreign key: Object waar deze regel betrekking op heeft. Doorgaans hetzelfde als ID in tabel wp_posts
breadcrumb_title Misschien wel precies wat het zegt: Hoe deze pagina verschijnt in het broodkruimelpad
canonical ?
permalink ?
primary_focus_keyword De focus keyphrase in Yoast-secties van pagina's
title ?
description Meta description in de Yoast-sectie van een pagina

Zie ook

Bronnen