Title: Error establishing database connection error
Last modified: January 2, 2024

---

# Error establishing database connection error

 *  Resolved [sammishra](https://wordpress.org/support/users/sammishra/)
 * (@sammishra)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-error-2/)
 * We have a website based on php, next js. But in recent days we are facing this
   issue which says ‘ error establishing database connection’ and hence we could
   not access our cmspanel. While checking the causes of this error we found an 
   unusual activity in yoast_seo_indexable table, in which about 4000-5000 new rows
   are getting added each day, among which most of them are of null values. Could
   you please help us to know the importance of this table and effect it is causing
   on the wordpress.
    -  This topic was modified 2 years, 5 months ago by [sammishra](https://wordpress.org/support/users/sammishra/).

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

 *  [Rohan Sadanandan](https://wordpress.org/support/users/rohans123/)
 * (@rohans123)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-error-2/#post-17311907)
 * Hi [@sammishra](https://wordpress.org/support/users/sammishra/),
 * Thanks for reaching out.
 * The Indexable table contains all your SEO data.
 * First, let’s see what the Yoast SEO plugin is doing when you start the SEO Data
   Optimization process under Yoast SEO > Tools:
    1. The plugin performs what we call the [indexables process](https://developer.yoast.com/blog/the-exciting-new-technology-that-is-indexables/),
       which moves data from one table in your database to another table (_wp\_yoast\
       _indexable_) for each object on your site (posts, pages or anything else that
       has a URL). This is a one-time process that will help improve the plugin’s performance.
    2. Then, it analysis each of your posts, looking for links inside the content. 
       It uses this information to give you information about how your posts are interlinked.
       This is used in the [text link counter feature](https://yoast.com/how-to-use-the-text-link-counter/).
    3. Finally, it will figure out what the prominent words in your content are. This
       is used for the [internal linking suggestions feature](https://yoast.com/features/internal-linking-suggestions/).
 * You can reset the indexables by following the steps in this guide: [How to reset the Yoast indexables](https://yoast.com/help/how-to-reset-yoast-indexables/).
   I can assure you that your hard work will not be lost as the default WordPress
   tables also contain SEO data. 
 * By default, as per the [technical specification](https://developer.yoast.com/features/indexables/technical-specification/),
   Yoast SEO will continuously create indexables for all the content that can be
   optimized on a site. This includes posts, pages, custom post types, and archives
   for taxonomies (categories, tags, and custom types), users, and so on.
 * We understand you want to optimize the _wp\_yoast\_indexable_ table considering
   its table size. We provide a range of filters to alter the default behavior or
   interact with the table; you might choose the suitable one.
    - You can [disable the creation of new indexables](https://developer.yoast.com/features/indexables/indexables-filters/#disabling-indexables-completely).
    - You can [exclude specific _post type_ and _taxonomies_](https://developer.yoast.com/features/indexables/indexables-filters/#excluding-content).
    - You [force a (re)indexing process](https://developer.yoast.com/features/wp-cli/reindex-indexables/)
      via WP CLI.
 * We hope this will help you in the right direction. Let us know if you’ve any 
   further questions.
 *  Thread Starter [sammishra](https://wordpress.org/support/users/sammishra/)
 * (@sammishra)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-error-2/#post-17312011)
 * Sir, do you think that the error ‘Error establishing database connection’ was
   triggered because of this plugin?. Please provide us some insights on this.
 * (1539057, NULL, NULL, NULL, ‘user’, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
   NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL,‘
   [https://secure.gravatar.com/avatar/?s=500&d=mm&r=g&#8217](https://secure.gravatar.com/avatar/?s=500&d=mm&r=g&#8217);,
   NULL, NULL, ‘gravatar-image’, NULL, NULL, ‘[https://secure.gravatar.com/avatar/?s=500&d=mm&r=g&#8217](https://secure.gravatar.com/avatar/?s=500&d=mm&r=g&#8217);,
   NULL, ‘gravatar-image’, NULL, NULL, NULL, NULL, ‘2021-12-29 06:11:15’, ‘2022-
   01-31 17:45:21’, 1, NULL, NULL, NULL, NULL, 0),
 * (1539058, ”, NULL, NULL, ‘post’, NULL, NULL, NULL, NULL, NULL, NULL, ‘unindexed’,
   NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL,
   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ‘2021-12-29
   06:11:15’, ‘2021-12-29 06:11:15’, 1, NULL, NULL, NULL, NULL, 0),
 * (1533386, ”, NULL, NULL, ‘post’, NULL, NULL, NULL, NULL, NULL, NULL, ‘unindexed’,
   NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL,
   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ‘2021-12-27
   06:02:53’, ‘2021-12-27 06:02:53’, 1, NULL, NULL, NULL, NULL, 0),
 * Please refer the above rows, these kind of values are getting stored in yoast_seo_indexable
   table, There is about 43 lakh rows in yoast_seo_indexable table and each day 
   about 4-5 thousand rows are getting added but the rows are more or less like 
   the ones that i provided above, containing just the null values.
    -  This reply was modified 2 years, 5 months ago by [sammishra](https://wordpress.org/support/users/sammishra/).
 *  Thread Starter [sammishra](https://wordpress.org/support/users/sammishra/)
 * (@sammishra)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-error-2/#post-17312030)
 * (1539057, NULL, NULL, NULL, ‘user’, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
   NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL,‘
   [https://secure.gravatar.com/avatar/?s=500&d=mm&r=g&#8217](https://secure.gravatar.com/avatar/?s=500&d=mm&r=g&#8217);,
   NULL, NULL, ‘gravatar-image’, NULL, NULL, ‘[https://secure.gravatar.com/avatar/?s=500&d=mm&r=g&#8217](https://secure.gravatar.com/avatar/?s=500&d=mm&r=g&#8217);,
   NULL, ‘gravatar-image’, NULL, NULL, NULL, NULL, ‘2021-12-29 06:11:15’, ‘2022-
   01-31 17:45:21’, 1, NULL, NULL, NULL, NULL, 0),
 * (1539058, ”, NULL, NULL, ‘post’, NULL, NULL, NULL, NULL, NULL, NULL, ‘unindexed’,
   NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL,
   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ‘2021-12-29
   06:11:15’, ‘2021-12-29 06:11:15’, 1, NULL, NULL, NULL, NULL, 0),
 * (1533386, ”, NULL, NULL, ‘post’, NULL, NULL, NULL, NULL, NULL, NULL, ‘unindexed’,
   NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL,
   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ‘2021-12-27
   06:02:53’, ‘2021-12-27 06:02:53’, 1, NULL, NULL, NULL, NULL, 0),
 * Please refer the above rows, these kind of values are getting stored in yoast_seo_indexable
   table, There is about 43 lakh rows in yoast_seo_indexable table and each day 
   about 4-5 thousand rows are getting added but the rows are more or less like 
   the ones that i provided above, containing just the null values.
 *  [Rohan Sadanandan](https://wordpress.org/support/users/rohans123/)
 * (@rohans123)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-error-2/#post-17312078)
 * Hi [@sammishra](https://wordpress.org/support/users/sammishra/),
 * Can you please try the following steps and let us know the results?
    1. Install & activate the [Yoast Test Helper plugin](https://wordpress.org/plugins/yoast-test-helper/)
    2. Go to Tools > Yoast Test
    3. Locate the Yoast SEO section and click on the ‘_Reset indexables tables & migrations_‘,‘
       _Reset Prominent words calculation_‘, and ‘_Reset Internal link counter_‘ buttons.
       After each click, the page will reload to confirm that the specific reset was
       successful.
    4. Go to SEO > Tools, and under SEO data, click the “Start SEO data optimization”
       button to allow Yoast to rescan your content.
 * Do let me know how it goes.
 *  Thread Starter [sammishra](https://wordpress.org/support/users/sammishra/)
 * (@sammishra)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-error-2/#post-17322142)
 * I need to confirm this once, I have deactivated yoast seo plugin and the backend
   has not gone down from past 20 hrs. But we have lost all seo settings. I wanted
   to try the yoast test helper plugin that you mentioned once, but could you please
   specify the versions and configurations required inorder to install it and the
   issue that i might face after its installation.
 * Please let us know if there is any alternative method to optimize that yoast_indexable
   table.
 *  [Rohan Sadanandan](https://wordpress.org/support/users/rohans123/)
 * (@rohans123)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-error-2/#post-17322586)
 * Hi [@sammishra](https://wordpress.org/support/users/sammishra/),
 * Before installing the Yoast Test Helper plugin, please make sure that you’re 
   running the latest version of the Yoast SEO plugin (v21.7), and we recommend 
   creating regular backups of your site and database for your site’s health and
   safety. A backup is crucial before installing, updating, or removing plugins 
   and provides you with a safety net if something were to go wrong. Learn more 
   about the [benefits of regular backups](https://yoast.com/help/how-to-backup-your-wordpress-site/).
 *  Thread Starter [sammishra](https://wordpress.org/support/users/sammishra/)
 * (@sammishra)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-error-2/#post-17324777)
 * I have deactivated the yoast seo plugin, and the site as well as the wordpress
   is working fine now. Thank you for your help.

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

The topic ‘Error establishing database connection error’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

## Tags

 * [indexables](https://wordpress.org/support/topic-tag/indexables/)

 * 8 replies
 * 2 participants
 * Last reply from: [sammishra](https://wordpress.org/support/users/sammishra/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-error-2/#post-17324777)
 * Status: resolved