Fix Yoast SEO was unable to create the database tables required

Search Engine Optimization

Fix Yoast SEO was unable to create the database tables required

Fix Yoast SEO was unable to create the database tables required and as such will not function correctly. These two Yoast SEO WordPress database errors “Wp_Yoast_SEO_Meta table doesn’t exist in the database” and “Wp_Yoast_SEO_Links table doesn’t exist in the database” are very common. I will tell you how can you create these two tables in the database using phpMyAdmin and SQL queries.

You should know that when you install the Yoast SEO plugin for your website SEO and Image SEO purpose then Yoast creates two tables named Wp_Yoast_SEO_Meta and Wp_Yoast_SEO_Links in a database for its own evaluation automatically.

Sometimes it is possible that these two tables don’t create automatically. The reason may be anything including hosting provider database limitations, plugin issues or CMS problems.

So, to function the Yoast SEO plugin properly. You have to create these two tables (Wp_Yoast_SEO_Meta and Wp_Yoast_SEO_Links) manually.

The error will look like this.

These are sample error from legalhelplineindia.com

Table ‘legalhelpline.wp_yoast_seo_meta’ doesn’t exist]
SELECT COUNT( ID ) as total_orphaned, post_type FROM wp_posts WHERE ID IN ( SELECT object_id FROM wp_yoast_seo_meta WHERE wp_yoast_seo_meta.incoming_link_count = 0 AND object_id != ‘{ 4 }’ ) AND post_status = ‘publish’ AND post_type IN ( ‘post’,’page’,’lawyer’,’legal’ ) GROUP BY post_type

WordPress database error: [Table ‘legalhelpline.wp_yoast_seo_meta’ doesn’t exist]
SELECT ID FROM wp_posts AS posts LEFT JOIN wp_yoast_seo_meta AS yoast_meta ON yoast_meta.object_id = posts.ID WHERE posts.post_status = “publish” AND posts.post_type IN ( “post”, “page”, “lawyer”, “legal” ) AND yoast_meta.internal_link_count IS NULL LIMIT

Through this post, I will guide you how can you create those two tables by your own? Let’s see it now and fix Yoast SEO was unable to create the database tables required and as such will not function correctly error.

Read AlsoTop 30 plugins every WordPress user should install

Wp_Yoast_SEO_Meta & Wp_Yoast_SEO_Links tables creation

To create a table in the hosting database you have to understand how a database can be accessed easily. The best way to access the database in cPanel. Through cPanel you can easily open the phpMyAdmin client.

Accessing database through cPanel

Follow these steps to open phpMyAdmin where we will create tables.

1. Open cPanel (Generally, the link is domain name followed by cPanel like this https:seobegins.com/cpanel

2. Search for phpMyAdmin and click to open it.

3. Now select your relevant database by clicking it.

4. You can see the selected database at the banner.

Now it’s time to create Wp_Yoast_SEO_Meta and Wp_Yoast_SEO_Links tables using SQL queries. Let’s see it one by one.

Creating Wp_Yoast_SEO_Meta table in phpMyAdmin

Follow these steps to create WP_Yoast_SEO_Meta table.

  1. Select the right database in phpMyAdmin
  2. Navigate to SQL section
  3. Paste the SQL query given below
  4. Click on the Go button to execute it.
  5. Verify-in the tables list that the WP_Yoast_SEO_Meta has been created

CREATE TABLE `wp_yoast_seo_meta` (

`object_id` bigint(20) unsigned NOT NULL,

`internal_link_count` int(10) unsigned NOT NULL DEFAULT ‘0’,

`incoming_link_count` int(10) unsigned DEFAULT NULL,

UNIQUE KEY `object_id` (`object_id`)

) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

Creating yoast table in database using phpMyAdmin

Creating Wp_Yoast_SEO_Links table in phpMyAdmin

Follow these steps to create WP_Yoast_SEO_Links table.

  1. Select the right database in phpMyAdmin
  2. Navigate to SQL section
  3. Paste the SQL query given below
  4. Click on the Go button to execute it.
  5. Verify-in the tables list that the WP_Yoast_SEO_Meta has been created

CREATE TABLE `wp_yoast_seo_links` (

`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,

`url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`post_id` bigint(20) unsigned NOT NULL,

`target_post_id` bigint(20) unsigned NOT NULL,

`type` varchar(8) COLLATE utf8mb4_unicode_ci NOT NULL,

PRIMARY KEY (`id`),

KEY `link_direction` (`post_id`,`type`)

) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

Watch our YouTube tutorial on Creation Yoast SEO tables

I hope after the creation of these two SEO tables. The database error will be fixed and Yoast will start working well for your WordPress website.

If you have any queries or concern then comment below.

Thanks for reading.

Have a good day!

Comment (1)

  1. mvpetrovich

    I need the complete SQL for all the Yoast tables, not just these two. My error logs are filling up with over a gigabyte per hour. It shut down my server. I have deactivated it for now. I tried deleting the plugin and reinstalling it.

Comments are closed.