Fixing Missing or Broken wp_aioseo_cache Table (AIOSEO)

If you are seeing errors related to the wp_aioseo_cache table (e.g. missing columns like key or is_object), the table may be corrupted or incomplete. This can break WP-CLI commands and cause LiteSpeed Cache purge to return a 403 error.

This guide explains how to safely recreate the table with the correct schema.


Log in to the database

Use the server’s MySQL/MariaDB root credentials. On CyberPanel servers, the root password is stored in /etc/cyberpanel/mysqlPassword.

mysql -u root -p"$(cat /etc/cyberpanel/mysqlPassword)" YOUR_DATABASE_NAME

Replace YOUR_DATABASE_NAME with your actual database name.


Drop the incorrect table

Remove the broken table to avoid conflicts:

DROP TABLE IF EXISTS wp_aioseo_cache;

Recreate the table with the correct structure

Important: key is a reserved SQL keyword. Always wrap it in backticks.

CREATE TABLE `wp_aioseo_cache` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `key` varchar(80) NOT NULL,
  `value` longtext NOT NULL,
  `is_object` tinyint(1) NOT NULL DEFAULT 0,
  `expiration` datetime DEFAULT NULL,
  `created` datetime NOT NULL,
  `updated` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ndx_aioseo_cache_key` (`key`),
  KEY `ndx_aioseo_cache_expiration` (`expiration`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

Verify the table structure

Run:

DESCRIBE wp_aioseo_cache;

Make sure the following fields are present:

  • id

  • key

  • value

  • is_object

  • expiration

  • created

  • updated

If key or is_object is missing, the plugin will not function correctly.


Exit the database

EXIT;

Why this works

The All in One SEO plugin expects the wp_aioseo_cache table to exactly match its expected schema. If any column (especially key) is missing, WordPress initialization will fail. This can:

  • break WP-CLI commands

  • prevent LiteSpeed Cache purge from running

  • generate SQL errors during plugin activation

Rebuilding the table restores the required structure and resolves these issues.


If you want to confirm the fix, paste the output of:

DESCRIBE wp_aioseo_cache;

and verify all required columns exist.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Reset a user's password of WordPress through phpMyAdmin

To reset a user's password in WordPress, follow these steps: Log in to your cPanel account....

How to Reset the Admin Panel Password in DataLife Engine

To reset the admin panel password for DataLife Engine (DLE) from phpMyAdmin, follow these steps:...

Steps to Allow Remote Database Access with a Wildcard Host

To configure remote database access for cPanel, allowing a host with a wildcard (%), you would...

Accessing MySQL Using a Stored Password (CyberPanel)

On servers managed by CyberPanel, the MySQL root password is stored in a local file. Instead of...