Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress plugin setting data

I want to know that where the plugins settings data saved in server? Means, when we change any plugin settings (e.g. For simple captcha, it is settings as-> use number, user alpha, captcha color etc), then in which file or database , these settings are saved.

like image 803
Sachin Thakur Avatar asked Apr 19 '12 05:04

Sachin Thakur


People also ask

Where are WordPress plugin settings stored?

The text, metadata, and settings are stored in the WordPress database. Static files like images, JS, CSS used by the plugin are stored in the plugins directory. The users' files uploaded when working with the plugin are stored in the plugin-specific folder inside the wp-content/uploads directory.

Do WordPress plugins collect data?

WordPress requirements for Privacy Policies The WordPress developer itself doesn't collect and use personal data, but rather the website owner collects and uses personal data through the installed plugin.


2 Answers

All settings of the Plugin will be saved in the db.

Your Plugin can choose which table they wanted to store the setting into. Check the source code of your Plugin.

  • If your Plugins uses get_options(), then it will stored in the wp_options table
  • If your Plugins uses get_post_meta(), then it will be stored in the wp_postmeta table
  • If your Plugins uses get_comment_meta(), then it will be stored in the wp_commentmeta table

Your Plugin might also have created its own table to store the settings.

like image 167
Sudar Avatar answered Oct 08 '22 22:10

Sudar


Inside WordPress database you will look a table like 'wp_options'. During wp install ,If you use your table prefix 'xyz'. Inside database your table name will 'xyz_options'. If you use WP Setting API and options.php, your plugin data will save in this table.

<?php
$data= $GLOBALS['wpdb']->get_results( 'SELECT * FROM xyz_options', OBJECT );
echo '<pre>';
print_r($data);
echo '</pre>';
?>



https://codex.wordpress.org/Options_API
https://codex.wordpress.org/Database_Description#Table:_wp_options
https://codex.wordpress.org/Class_Reference/wpdb
like image 31
Abdur Rahim Avatar answered Oct 08 '22 22:10

Abdur Rahim