Title: Issues with Plugin Activation &#8211; Database Table Creation
Last modified: July 29, 2024

---

# Issues with Plugin Activation – Database Table Creation

 *  Resolved [jdrt](https://wordpress.org/support/users/jdrt/)
 * (@jdrt)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issues-with-plugin-activation-database-table-creation/)
 * Hello,
 * I’m experiencing issues with the activation of the “Widgets for Google Reviews”
   plugin on my WordPress site. During the activation process, I receive the following
   error:
 * see image: [https://snipboard.io/k9F8WB.jpg](https://snipboard.io/k9F8WB.jpg)
 * Plugin activation failed because the required database tables could not be created!
   
   We got the following error from the database:Run the following SQL codes in your
   database administration interface (e.g., PhpMyAdmin) to create the tables:CREATE
   TABLE JwIOM1_trustindex_google_reviews (`id` TINYINT(1) NOT NULL AUTO_INCREMENT,`
   hidden` TINYINT(1) NOT NULL DEFAULT 0,`user` VARCHAR(255) CHARACTER SET utf8 
   COLLATE utf8_general_ci,`user_photo` TEXT,`text` TEXT CHARACTER SET utf8mb4 COLLATE
   utf8mb4_general_ci,`rating` DECIMAL(3,1),`highlight` VARCHAR(11),`date` DATE,`
   reviewId` TEXT,`reply` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
   PRIMARY KEY (`id`))Then try activating the plugin again.
 * Steps I’ve Taken:
    1. I accessed the `schema.php` file and added `IF NOT EXISTS` to the SQL command
       to avoid errors if the table already exists. Here is the modified SQL command:
 * $ti_db_schema = [
   ‘reviews’ => “CREATE TABLE IF NOT EXISTS “. $this->get_tablename(‘
   reviews’) .” (`id` TINYINT(1) NOT NULL AUTO_INCREMENT,`hidden` TINYINT(1) NOT
   NULL DEFAULT 0,`user` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,`
   user_photo` TEXT,`text` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,`
   rating` DECIMAL(3,1),`highlight` VARCHAR(11),`date` DATE,`reviewId` TEXT,`reply`
   TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,PRIMARY KEY (`id`))“];
 * 2. I verified that the configuration settings of my site are identical to those
   of other sites on the same server where the plugin works without issues.
 * Despite these steps, the plugin still fails to activate and the same errors persist.
   Request for Assistance:
 * Could you please assist me in resolving these issues? Specifically, I would like
   guidance on the correct configuration of database table creation during plugin
   activation.
 * Any help or suggestions would be greatly appreciated.
 * Thank you very much!
 * Best regards,
   David
    -  This topic was modified 1 year, 10 months ago by [jdrt](https://wordpress.org/support/users/jdrt/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fissues-with-plugin-activation-database-table-creation%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [Lídia from Trustindex](https://wordpress.org/support/users/liditrudex/)
 * (@liditrudex)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issues-with-plugin-activation-database-table-creation/#post-17921516)
 * Hi [@jdrt](https://wordpress.org/support/users/jdrt/) !
 * We’re checking it!
 * Feel free to write us, if you need any assistance,
 * Trustindex
 *  Plugin Support [Lídia from Trustindex](https://wordpress.org/support/users/liditrudex/)
 * (@liditrudex)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issues-with-plugin-activation-database-table-creation/#post-17927054)
 * Hi [@jdrt](https://wordpress.org/support/users/jdrt/) !
 * Does it add the table if you run it manually? Also does the user have permission
   to create a table?
 * Feel free to write us, if you need any assistance,
 * Trustindex
 *  Thread Starter [jdrt](https://wordpress.org/support/users/jdrt/)
 * (@jdrt)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issues-with-plugin-activation-database-table-creation/#post-17927317)
 * Hi Trustindex team,
 * Thank you for your prompt response.
 * Yes, I manually ran the SQL command provided in the error message, and it successfully
   created the table in the database. This confirms that the user has the necessary
   permissions to create tables.
 * However, despite this, the plugin still fails to activate and throws the same
   error regarding the creation of database tables. As mentioned earlier, this issue
   is only occurring on one specific site. Other sites on the same server, with 
   identical configurations, have the plugin installed and working without any issues.
 * Could there be another reason why the plugin isn’t recognizing the table after
   it’s created? I would appreciate any further guidance you can provide to help
   resolve this issue.
 * Thank you for your assistance.
 * Best regards,
   david
 *  Plugin Support [Lídia from Trustindex](https://wordpress.org/support/users/liditrudex/)
 * (@liditrudex)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issues-with-plugin-activation-database-table-creation/#post-17929821)
 * Thanks for your answer! We’ll continue checking this then.
 *  Plugin Support [Lídia from Trustindex](https://wordpress.org/support/users/liditrudex/)
 * (@liditrudex)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issues-with-plugin-activation-database-table-creation/#post-17936109)
 * Hi [@jdrt](https://wordpress.org/support/users/jdrt/) !
 * Could you reach out to us via email?
 * Here is our address: [support@trustindex.io](https://wordpress.org/support/topic/issues-with-plugin-activation-database-table-creation/support@trustindex.io?output_format=md).
 * Feel free to write us, if you need any assistance,
 * Trustindex
    -  This reply was modified 1 year, 10 months ago by [Lídia from Trustindex](https://wordpress.org/support/users/liditrudex/).
 *  Thread Starter [jdrt](https://wordpress.org/support/users/jdrt/)
 * (@jdrt)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issues-with-plugin-activation-database-table-creation/#post-17941225)
 * Hi,
 * Thank you for your reply. Yesterday I sent the email to [support@trustindex.io](https://wordpress.org/support/topic/issues-with-plugin-activation-database-table-creation/support@trustindex.io?output_format=md)
   as instructed. How long does it take to process the email? Thank you.
 * Best regards
 *  Plugin Support [Lídia from Trustindex](https://wordpress.org/support/users/liditrudex/)
 * (@liditrudex)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issues-with-plugin-activation-database-table-creation/#post-17942812)
 * We receive a lot of emails, but we reply as soon as we can.
 * Answered you there.
 *  Thread Starter [jdrt](https://wordpress.org/support/users/jdrt/)
 * (@jdrt)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/issues-with-plugin-activation-database-table-creation/#post-17959279)
 * Hi Lídia,
 * Thank you for your response. I hadn’t seen the email you sent me, I apologize
   for that. I have just replied with the necessary details. Thank you very much.
 *  Plugin Support [Szilveszter from Trustindex](https://wordpress.org/support/users/szlifkaszilveszter28/)
 * (@szlifkaszilveszter28)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/issues-with-plugin-activation-database-table-creation/#post-17968914)
 * Hi, [@jdrt](https://wordpress.org/support/users/jdrt/) !
 * We forwarded the details to the IT team, they will hopefully resolve it in a 
   few days.
 * Feel free to write us, if you need any assistance,
   Trustindex
 *  Plugin Support [Lídia from Trustindex](https://wordpress.org/support/users/liditrudex/)
 * (@liditrudex)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/issues-with-plugin-activation-database-table-creation/#post-17998522)
 * Hi [@jdrt](https://wordpress.org/support/users/jdrt/) !
 * Please update the plugin to the newest version. This issue is resolved.
 * Thank you for ypour patience!
 * Feel free to write us, if you need any assistance,
 * Trustindex
 *  Thread Starter [jdrt](https://wordpress.org/support/users/jdrt/)
 * (@jdrt)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/issues-with-plugin-activation-database-table-creation/page/2/#post-17998570)
 * Hi [@liditrudex](https://wordpress.org/support/users/liditrudex/),
   Great! I just
   tried it and it works perfectly. Thanks for fixing the problem.
 * Best regards,
 * David
 *  Plugin Support [Lídia from Trustindex](https://wordpress.org/support/users/liditrudex/)
 * (@liditrudex)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/issues-with-plugin-activation-database-table-creation/page/2/#post-18003061)
 * Thanks for your feedback!
 * Let us know if we can help with anything!

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

The topic ‘Issues with Plugin Activation – Database Table Creation’ is closed to
new replies.

 * ![](https://ps.w.org/wp-reviews-plugin-for-google/assets/icon-256x256.png?rev
   =2721569)
 * [Widgets for Google Reviews](https://wordpress.org/plugins/wp-reviews-plugin-for-google/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-reviews-plugin-for-google/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-reviews-plugin-for-google/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-reviews-plugin-for-google/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-reviews-plugin-for-google/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-reviews-plugin-for-google/reviews/)

 * 17 replies
 * 3 participants
 * Last reply from: [Lídia from Trustindex](https://wordpress.org/support/users/liditrudex/)
 * Last activity: [1 year, 9 months ago](https://wordpress.org/support/topic/issues-with-plugin-activation-database-table-creation/page/2/#post-18003061)
 * Status: resolved