Error creating tables




Wordpress LScache Plugin: Error creating tables

Last Updated on: Wed, 15 Apr 2026 00:00:02
Error archive: wp-admin/error_log Error: You have an error in your SQL syntax check the manual that corresponds to your MariaDB server version for the right syntax to use near ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci at line 1 for consultation CREATE TABLE IF NOT EXISTS wp_litespeed_img_optm () DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci feita por do_action(toplevel_page_lscache-settings), WP_Hook->do_action, WP_Hook->apply_filters, LiteSpeed_Cache_Admin_Display->show_menu_settings, require_once(wp-content/plugins/litespeed-cache/admin/tpl/settings.php), require(wp-content/plugins/litespeed-cache/admin/tpl/setting/settings_optimize.php), LiteSpeed_Cache_Data::optm_available, LiteSpeed_Cache_Data::get_instance, LiteSpeed_Cache_Data->__construct, LiteSpeed_Cache_Data->_create_tb_img_optm The error occurs for the following tables: wp_litespeed_img_optm wp_litespeed_optimizer Hi @martdsam, can you check is your WordPress database contain tables call wp_litespeed_optimizer and wp_litespeed_img_optm? Also, can you check these two files is under your plugin folder? /plugins/litespeed/lscwp-git/litespeed-cache/inc/data_structure/img_optm.sql /plugins/litespeed/lscwp-git/litespeed-cache/inc/data_structure/optm.sql Actually in my gitignore .sql files were being ignored. I removed it and everything was right. Why do you use a .sql file if it is possible to do everything in a .php file? Thanks a lot for the help. Hi @martdsam, its just a way for us to control the data structure. We will consider updating our document for avoiding this issue, thanks for your report!



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference