Skip to content

FIX Error: Yoast SEO cannot create database tables

If you are using WordPress and the infamous Yoast SEO plugin and are getting the Error: The Yoast Link Statistics feature is currently disabled then this guide is for you! In this guide, we will go over how to Fix the Error: Yoast SEO cannot create database tables.

Understanding the Error: The Yoast Link Statistics feature is currently disabled

This error occurs when the Yoast SEO WordPress Plugin is unable to create the required tables for the new link building feature. Generally these tables are created automatically however, sometimes they do not get created. The required tables are:

wp_yoast_seo_links
wp_yoast_seo_meta

To resolve this error, we will need to create the tables in your WordPress database. You can do this quickly via PHPMyadmin. First, you will need to know the name of your WordPress database. Secondly, you will need to create a backup of your WordPress database before making any changes.

Resolving the Error: The Yoast Link Statistics feature is currently disabled

1. From PHPMyadmin, click on the Database that belongs to your WordPress website from the left-hand side.

Note: The database name can be located by checking the ‘wp-config.php’ file.

PHPMyadmin Your Database

2. Click on the ‘SQL‘ tab from the top bar of PHPMyAdmin.

PHPMyadmin fix Yoast Database Error

3. Create the Yoast Seo 5.0 Tables by pasting the following code into the box then clicking on the ‘Go‘ button at the bottom right-hand corner of the page.

 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;
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;

Paste the above code into the box as shown below, then click ‘Go‘:

create yoast seo 5.0 tables.sql

That’s it! You have successfully created the Yoast seo 5.0 tables in your WordPress database. This should resolve the error you were receiving from Yoast.

Leave a Reply

Your email address will not be published. Required fields are marked *