error establishing a database connection 3

I too had faced the same issue many times but after refreshing the browser it solved my problem. Kindly check the wp-config file and verify if the database name and other information is correct. Another thing you can try is restarting your local host.

Help posting values to DB on submit using $wpdb->query

$wpdb has an insert method, so you can try the following: $table=”wp_email_subscribers”; $data = array( ‘first_name’ => $firstname, ‘last_name’ => $lastname, ’email’=> $email , ‘gdpr_consent’=>$gdprconsent ); $format = array(‘%s’,’%s’, ‘%s’, ‘%s’); $wpdb->insert($table,$data,$format); var_dump($wpdb->insert_id);

Why am I being prompted to reinstall wordpress?

If you moved the folder of the root of the site, so that the URL is https://www.example.com instead of https://www.example.com/blog , then you need to tell the database that’s where the site lives. This is done by modifying two entries in the wp-options table to change the URL. You will also need to change the … Read more

WordPress users table missing indexes

Sounds like the auto increment handling is not setup correctly. Go into phpMyAdmin and make sure that the PRIMARY KEY is set to AUTO_INCREMENT You can also run this SQL command: ALTER TABLE wp_users AUTO_INCREMENT = 1 The 1 above you need to make sure the auto increment value is set to the highest number … Read more

How to show result of sql query in a page?

Solved! I follow this tutorial: https://wordpress.org/gutenberg/handbook/designers-developers/developers/tutorials/block-tutorial/writing-your-first-block-type/ https://wordpress.org/gutenberg/handbook/designers-developers/developers/tutorials/block-tutorial/creating-dynamic-blocks/ And complimented with this: https://gist.github.com/mattheu/7cf235b4f932de891bc21cb5f3ff3de6

Export only a part of the database for migration

If you don’t mind exporting pages and posts separately, you can use the default WordPress export tool to achieve that. On the Export screen you can set the tool to export only posts. Then add a suitable date filter. After that do another export, but this time set the tool to export only pages. You … Read more