Title: Error creating tables
Last modified: December 14, 2018

---

# Error creating tables

 *  Resolved [Samuel](https://wordpress.org/support/users/martdsam/)
 * (@martdsam)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/error-creating-tables/)
 * 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

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [stanley@litespeed](https://wordpress.org/support/users/stanleylitespeed/)
 * (@stanleylitespeed)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/error-creating-tables/#post-10988122)
 * Hi [@martdsam](https://wordpress.org/support/users/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`
 *  Thread Starter [Samuel](https://wordpress.org/support/users/martdsam/)
 * (@martdsam)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/error-creating-tables/#post-10988721)
 * 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.
 *  [stanley@litespeed](https://wordpress.org/support/users/stanleylitespeed/)
 * (@stanleylitespeed)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/error-creating-tables/#post-10989660)
 * Hi [@martdsam](https://wordpress.org/support/users/martdsam/), it’s just a way
   for us to control the data structure. We will consider updating our document 
   for avoiding this issue, thanks for your report!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Error creating tables’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [stanley@litespeed](https://wordpress.org/support/users/stanleylitespeed/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/error-creating-tables/#post-10989660)
 * Status: resolved