How to use add_settings_error in register_setting callback

Take a look at the add_settings_error prototype. add_settings_error( $setting, $code, $message, $type ); The first argument is your settings name/key — or if your setting is on another page (eg general) it should be the page key. The second is whatever you’d like to add to the ID attribute, then error/updated message, and finally type. … Read more

How can I see the error generated by plugin activation?

If a plugin has the error output The plugin generated xxx characters of unexpected output during activation then that only means that there is some error output. Sadly WP can’t output anything more than this. Every error output sends a header (as var_dump/var_export/print_r/print/error/printf would output. In short: You won’t get any more info unless you’re … Read more

error establishing a database connection

Are you still facing the issue? I might be able to help you out. Here are some more reasons why it might be happening: A corrupted database – Bad plugins, addons, themes and data-transfer interruptions might leave your database short of tables or completely corrupted at worst. Corrupted WordPress files Found this on: http://www.wpkube.com/how-to-fix-error-establishing-database-connection-in-wordpress/

All plugins deactivated due to error

@Jutta, this is a hard question to answer. Many unknowns. What you may do is to understand the error. WordPress may have the error log. Set define( ‘WP_DEBUG_LOG’, true ); in your config file, and then you need to check the results as per this article. Note that this allows you to write to /wp-content/debug.log … Read more