Why aren’t these WordPress options being saved to the database correctly?

The options are not being saved correctly because you used the wrong input name — it should match the second parameter for register_setting(). So for example, with register_setting(‘myplugin_options_group’, ‘api_username’), the input name should be api_username, but then you used myplugin_api_username. Additionally, it should be noted that screen_icon() has long been deprecated.

Plugin Options not being output

Basically, you’re not using the correct option name. In your viptips_settings_init() function, you use the name viptips_settings as the database option name when registering the setting: // The syntax is: register_setting( ‘<settings group name>’, ‘<database option name>’ ) register_setting( ‘pluginPage’, ‘viptips_settings’ ); So WordPress will use that viptips_settings when saving the option (i.e. update_option( ‘viptips_settings’, … Read more

Error: options page not found when I try to save the changes made in my settings page

The problem is in my file settings.php (which renders the form). Look at the form action. It says action=”options.php” and then the settings_field() inserts a hidden field with the correct action. But WordPress prioritizes the form action, so, when submit the form, WordPress tries to load options.php instead of the correct action in the hidden … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)