How to Fix the [Unknown column 'id' in 'field list'] Yoast Database Error

Seeing [Unknown column 'id' in 'field list'] FROM wp_yoast_seo_links in your error log? We have the fix.

This error will break any Cron job and many functions in your WordPress site.

In fact, we’ve seen this prevent the Headless Hostman from converting sites to static and pushing them live.

What Does It Mean?

In short, it means a key table in the Yoast database to optimize your content for SEO is missing.

What Causes This?

The most common causes are:

  1. Migrating a website from one server to another
  2. Changing site themes
  3. Copying a site from Production to Staging on WP Engine, or related services
  4. Pushing a site from Staging to Live on WP Engine, or related services
  5. Performing massive search and replace jobs

This issue can also randomly emerge in the middle of site operation, likely caused by Yoast’s own background tasks.

What Does it Do?

Most notably, it can break any Cron Job or Function that is handling the database, post data, or more. It halts its progress and issues a hard return which prevents said job or function from completing.

For many background tasks, or primary functions, this is a show stopper.

Like we mentioned, we saw this pop up in the Headless Hostman, which prevents a site from converting and pushing to our network.

How to Fix This

Luckily the team at Yoast has provided tools to fix this quite easily.

1. Download and Activate the Yoast Test Helper

2. Head to Into Yoast Test Helper

When it’s activated, you’ll see it under Tools > Yoast test

Head there, and scroll all the way to the bottom where you’ll find these.

  • Click Reset Internal Link Counter. Wait for it to finish
  • Then, finally, hit Reset Indexables tables & migrations. Wait for it to finish.

3. Re-Optimize the Yoast SEO Data 

When those are both done, you’ll need to re-optimize your SEO data.

  • Hover over Yoast SEO
  • Click “Tools”
  • You’ll now see the prompt to re-optimize your data.

  • Click it
  • Wait for it to complete

4. Try Re-Running Your Functions

For our troubleshooting, this not only fixes blockages with the Headless Hostman, but other background jobs and functions.

Need More Help?

Our team of devs is always here to help.

Give us a shout.

ready to get started?

Headless Hostman takes the best of both traditional CMS systems and other static host providers to create a site that is both easy to manage, fast, and secure.