Yoast - Automatisering: verschil tussen versies
(33 tussenliggende versies door dezelfde gebruiker niet weergegeven) | |||
Regel 1: | Regel 1: | ||
− | + | 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 | ||
+ | * Commando's betreffen WP-CLI, niet PHP. | ||
+ | |||
+ | == Yoast-objecten & locaties == | ||
+ | |||
+ | === Search appearance settings === | ||
+ | |||
+ | * Site: <code>wp-admin » SEO » Search Appearance</code> | ||
+ | * Inclusief de standaard-waardes voor de diverse Yoast-velden zoals ''SEO titles'' en ''meta descriptions''. | ||
+ | * Database: Tabel <code>wp_options</code> - Field <code>wpseo_titles</code> | ||
+ | * Beheer WP-CLI: <code>wp option</code>. Bv. <code> wp option get wpseo_titles</code>. | ||
+ | |||
+ | Voorbeeld (deel van de uitvoer): | ||
+ | |||
+ | <pre> | ||
+ | $ wp option get wpseo_titles | ||
+ | |||
+ | array ( | ||
+ | 'forcerewritetitle' => false, | ||
+ | 'separator' => 'sc-dash', | ||
+ | 'title-home-wpseo' => '%%sitename%% %%page%% %%sep%% %%sitedesc%%', | ||
+ | 'title-author-wpseo' => '%%name%%, Author at %%sitename%% %%page%%', | ||
+ | 'title-archive-wpseo' => '%%date%% %%page%% %%sep%% %%sitename%%', | ||
+ | 'title-search-wpseo' => 'Je zocht naar %%searchphrase%% %%page%% %%sep%% %%sitename%%', | ||
+ | 'title-404-wpseo' => 'Pagina niet gevonden %%sep%% %%sitename%%', | ||
+ | 'social-title-author-wpseo' => '%%name%%', | ||
+ | 'social-title-archive-wpseo' => '%%date%%', | ||
+ | 'social-description-author-wpseo' => '%%excerpt%%', | ||
+ | 'social-description-archive-wpseo' => '%%excerpt%%', | ||
+ | 'social-image-url-author-wpseo' => '', | ||
+ | 'social-image-url-archive-wpseo' => '', | ||
+ | 'social-image-id-author-wpseo' => 0, | ||
+ | 'social-image-id-archive-wpseo' => 0, | ||
+ | ... | ||
+ | </pre> | ||
+ | |||
+ | === Casus: Vertaalde site - 2021.08 === | ||
+ | |||
+ | Dit betreft een site die geklooned en vertaald is, van ''voorbeeld.nl'' naar ''example.com''. Ook de product_cat- & attribute-taxonomieën zijn vertaald: | ||
+ | |||
+ | * <code>wp option get wpseo_titles</code> toont echter nog steeds de oude attribuut-namen (bv. <code>metadesc-tax-pa_model</code>) | ||
+ | * Op database-niveau zijn de namen van de attribuut-taxonomieën écht vertaald (<code>SELECT distinct taxonomy FROM en_s1.wp_term_taxonomy;</code>): Dat gebeurt vanzelf als je via wp-admin de namen van taxonomieën aanpast. Toevallig speelt dat niet voor attribuut-taxonomie ''Model'': Da's hetzelfde in NL en EN | ||
+ | * <code>wp-admin » Products » Attributes » Een model-taxon » Yoast SEO » Meta description</code>: Hier staat dezelfde standaard NL-tekst die ik via <code>wp option get wpseo_titles</code> vond | ||
+ | |||
+ | == Databasemodel == | ||
+ | |||
+ | See [[Yoast - Database model]]. | ||
+ | |||
+ | == WP-CLI == | ||
+ | |||
+ | Een impressie van WP-CLI-commando's rondom Yoast: | ||
+ | |||
+ | * <code>wp yoast index</code>: 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 | ||
+ | * <code>wp option</code>: Om entries in tabel <code>wp_options</code> te beren → Zie elders voor details. | ||
+ | |||
+ | == wp options == | ||
+ | |||
+ | Enige algemene instellingen lijken te worden bijgehouden in <code>wp_options</code>. <code>custom_taxonomy_slugs</code> lijkt het enige relevante onderdeel hiervan te zijn tav. ''klonen & vertalen''. Wordt dit niet bijgewerkt als je de Yoast-index bijwerkt? | ||
+ | |||
+ | <pre> | ||
+ | # Overzicht van alle velden: | ||
+ | # | ||
+ | $ wp option list --field=option_name | grep -E -- 'yoast|wpseo' | ||
+ | |||
+ | wpseo | ||
+ | wpseo_titles | ||
+ | wpseo_social | ||
+ | wpseo_flush_rewrite | ||
+ | wpseo_taxonomy_meta | ||
+ | yoast_migrations_free | ||
+ | wpseo_ryte | ||
+ | </pre> | ||
+ | |||
+ | === wpseo === | ||
+ | |||
+ | Impressie: | ||
+ | <pre> | ||
+ | $ 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, | ||
+ | ) | ||
+ | </pre> | ||
+ | |||
+ | === wpseo_titles === | ||
+ | |||
+ | Een impressie (dit is een paar A4-tjes bij elkaar): | ||
+ | <pre> | ||
+ | $ wp option get wpseo_titles | ||
+ | |||
+ | array ( | ||
+ | 'forcerewritetitle' => false, | ||
+ | 'separator' => 'sc-dash', | ||
+ | 'title-home-wpseo' => '%%sitename%% %%page%% %%sep%% %%sitedesc%%', | ||
+ | 'title-author-wpseo' => '%%name%%, Author at %%sitename%% %%page%%', | ||
+ | 'title-archive-wpseo' => '%%date%% %%page%% %%sep%% %%sitename%%', | ||
+ | 'title-search-wpseo' => 'Je zocht naar %%searchphrase%% %%page%% %%sep%% %%sitename%%', | ||
+ | 'title-404-wpseo' => 'Pagina niet gevonden %%sep%% %%sitename%%', | ||
+ | 'social-title-author-wpseo' => '%%name%%', | ||
+ | 'social-title-archive-wpseo' => '%%date%%', | ||
+ | 'social-description-author-wpseo' => '%%excerpt%%', | ||
+ | 'social-description-archive-wpseo' => '%%excerpt%%', | ||
+ | 'social-image-url-author-wpseo' => '', | ||
+ | 'social-image-url-archive-wpseo' => '', | ||
+ | 'social-image-id-author-wpseo' => 0, | ||
+ | 'social-image-id-archive-wpseo' => 0, | ||
+ | ... | ||
+ | </pre> | ||
+ | |||
+ | == wp post meta == | ||
+ | |||
+ | Een aantal velden worden bijgehouden als <code>wp post meta</code>-velden. Oftewel regels in tabel <code>wp_post_meta</code>. | ||
+ | |||
+ | Voorbeeld (dit betreft een WooCommerce-product): | ||
+ | |||
+ | <pre> | ||
+ | $ 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 | | ||
+ | +---------+----------------------------------+-----------------------------------------------------------------------+ | ||
+ | </pre> | ||
+ | |||
+ | Dit lijken alle Yoast-velden bij elkaar te zijn: | ||
+ | |||
+ | * <code>_yoast_wpseo_focuskw</code> | ||
+ | * <code>_yoast_wpseo_linkdex</code> | ||
+ | * <code>_yoast_wpseo_metadesc</code> | ||
+ | * <code>_yoast_wpseo_content_score</code> | ||
+ | * <code>_yoast_wpseo_primary_product_cat</code>. | ||
+ | |||
+ | Hiervan zijn alleen deze beschrijfbaar: | ||
+ | |||
+ | * <code>_yoast_wpseo_focuskw</code> | ||
+ | * <code>_yoast_wpseo_metadesc</code>. | ||
+ | |||
+ | Ik weet niet wat <code>_yoast_wpseo_primary_product_cat</code> is. | ||
+ | |||
+ | == Tabel wp_yoast_indexable == | ||
Een handjevol van de velden: | Een handjevol van de velden: | ||
Regel 37: | Regel 272: | ||
* [[Databasemodel (WordPress)]] | * [[Databasemodel (WordPress)]] | ||
* [[Yoast (WordPress-plugin)]] | * [[Yoast (WordPress-plugin)]] | ||
+ | |||
+ | == Bronnen == | ||
+ | |||
+ | * https://stackoverflow.com/questions/51845139/where-are-the-yoast-seo-titles-and-descriptions-stored |
Huidige versie van 17 sep 2022 om 10:36
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
- Commando's betreffen WP-CLI, niet PHP.
Yoast-objecten & locaties
Search appearance settings
- Site:
wp-admin » SEO » Search Appearance
- Inclusief de standaard-waardes voor de diverse Yoast-velden zoals SEO titles en meta descriptions.
- Database: Tabel
wp_options
- Fieldwpseo_titles
- Beheer WP-CLI:
wp option
. Bv.wp option get wpseo_titles
.
Voorbeeld (deel van de uitvoer):
$ wp option get wpseo_titles array ( 'forcerewritetitle' => false, 'separator' => 'sc-dash', 'title-home-wpseo' => '%%sitename%% %%page%% %%sep%% %%sitedesc%%', 'title-author-wpseo' => '%%name%%, Author at %%sitename%% %%page%%', 'title-archive-wpseo' => '%%date%% %%page%% %%sep%% %%sitename%%', 'title-search-wpseo' => 'Je zocht naar %%searchphrase%% %%page%% %%sep%% %%sitename%%', 'title-404-wpseo' => 'Pagina niet gevonden %%sep%% %%sitename%%', 'social-title-author-wpseo' => '%%name%%', 'social-title-archive-wpseo' => '%%date%%', 'social-description-author-wpseo' => '%%excerpt%%', 'social-description-archive-wpseo' => '%%excerpt%%', 'social-image-url-author-wpseo' => '', 'social-image-url-archive-wpseo' => '', 'social-image-id-author-wpseo' => 0, 'social-image-id-archive-wpseo' => 0, ...
Casus: Vertaalde site - 2021.08
Dit betreft een site die geklooned en vertaald is, van voorbeeld.nl naar example.com. Ook de product_cat- & attribute-taxonomieën zijn vertaald:
wp option get wpseo_titles
toont echter nog steeds de oude attribuut-namen (bv.metadesc-tax-pa_model
)- Op database-niveau zijn de namen van de attribuut-taxonomieën écht vertaald (
SELECT distinct taxonomy FROM en_s1.wp_term_taxonomy;
): Dat gebeurt vanzelf als je via wp-admin de namen van taxonomieën aanpast. Toevallig speelt dat niet voor attribuut-taxonomie Model: Da's hetzelfde in NL en EN wp-admin » Products » Attributes » Een model-taxon » Yoast SEO » Meta description
: Hier staat dezelfde standaard NL-tekst die ik viawp option get wpseo_titles
vond
Databasemodel
WP-CLI
Een impressie van WP-CLI-commando's rondom Yoast:
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 nietwp option
: Om entries in tabelwp_options
te beren → Zie elders voor details.
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?
# Overzicht van alle velden: # $ wp option list --field=option_name | grep -E -- 'yoast|wpseo' wpseo wpseo_titles wpseo_social wpseo_flush_rewrite wpseo_taxonomy_meta yoast_migrations_free wpseo_ryte
wpseo
Impressie:
$ 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, )
wpseo_titles
Een impressie (dit is een paar A4-tjes bij elkaar):
$ wp option get wpseo_titles array ( 'forcerewritetitle' => false, 'separator' => 'sc-dash', 'title-home-wpseo' => '%%sitename%% %%page%% %%sep%% %%sitedesc%%', 'title-author-wpseo' => '%%name%%, Author at %%sitename%% %%page%%', 'title-archive-wpseo' => '%%date%% %%page%% %%sep%% %%sitename%%', 'title-search-wpseo' => 'Je zocht naar %%searchphrase%% %%page%% %%sep%% %%sitename%%', 'title-404-wpseo' => 'Pagina niet gevonden %%sep%% %%sitename%%', 'social-title-author-wpseo' => '%%name%%', 'social-title-archive-wpseo' => '%%date%%', 'social-description-author-wpseo' => '%%excerpt%%', 'social-description-archive-wpseo' => '%%excerpt%%', 'social-image-url-author-wpseo' => '', 'social-image-url-archive-wpseo' => '', 'social-image-id-author-wpseo' => 0, 'social-image-id-archive-wpseo' => 0, ...
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-product):
$ 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 |