请求协助修复WordPress(WooCommerce)丢失的wp_actionscheduler_actions表
重建WordPress(WooCommerce)wp_actionscheduler_actions表的phpMyAdmin操作指引
操作前提
确认你的WordPress数据库前缀为wp_(若使用自定义前缀,需将以下所有wp_替换为你的实际前缀),且已登录phpMyAdmin并选中目标数据库(如报错中的wordpress库)。
步骤1:打开SQL执行界面
在phpMyAdmin顶部导航栏点击「SQL」标签,进入SQL语句输入页面。
步骤2:执行建表SQL语句
将以下SQL代码粘贴至输入框,点击「执行」按钮:
CREATE TABLE IF NOT EXISTS `wp_actionscheduler_actions` ( `action_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `hook` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL, `scheduled_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `scheduled_date_local` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `args` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, `schedule` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `group_id` bigint(20) unsigned NOT NULL DEFAULT 0, `attempts` int(11) NOT NULL DEFAULT 0, `last_attempt_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `last_attempt_local` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `claim_id` bigint(20) unsigned NOT NULL DEFAULT 0, `extended_args` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`action_id`), KEY `hook` (`hook`), KEY `status` (`status`), KEY `scheduled_date_gmt` (`scheduled_date_gmt`), KEY `args` (`args`(191)), KEY `group_id` (`group_id`), KEY `claim_id` (`claim_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
步骤3:验证结果
返回数据库表列表,确认wp_actionscheduler_actions表已存在。刷新WordPress站点,检查报错是否消失。
额外提示
- 操作前建议备份当前数据库,避免意外数据问题。
- 若执行SQL时提示错误,检查是否正确替换了数据库前缀,或确认数据库权限是否足够执行建表操作。
内容的提问来源于stack exchange,提问作者David Li
相关产品推荐
相关产品推荐

