The Options API is a simple and standardized way of storing data in the database. The API makes it easy to create, access, update, and delete options.

learn more… | top users | synonyms

1
vote
4answers
657 views

Updating wp_options with an array on save_post results in duplicated entries

I'm not entirely sure this is Wordpress' fault, but I figure I'd ask anyway and see if anyone else has experienced any problems like this before. I'm trying to save an array to a wp_options table row....
0
votes
2answers
313 views

WP CLI to set options

I have WP-CLI working fine using WP Multisite (or network). I can create blogs, add users, set permissions etc. But am not certain how to enable plugins for individual blogs via WP CLI. For example, ...
0
votes
2answers
320 views

WP_Options high

I have a site where the options_id field in the wp_options table have grown very, very large. After a month and a half after the installation the auto_increment value is now at over 10 million. ...
1
vote
1answer
83 views

Best possible way to get all options

I need to provide a list of all options set via plugins etc to remote calls. There is a plugin WP API Options but it hardly does the job. There are two possible ways (that I know of) to get a list ...
1
vote
1answer
63 views

Does auto_load to 'no' in wp_options improve performance

I am trying to improve the performance of a wordpress based blog. I am looking at wp_options table and am thinking to set the column auto_load to 'no'. Does it have any side-effect on the site ...
0
votes
1answer
6 views

WPML admin texts with serialized objects

I have been trying to get a plugin to work with WPML - I'm almost there but I'm wondering if anyone knows if it's possible to get WPML's admin texts (wpml-config.xml) to read serialized objects stored ...
0
votes
1answer
44 views

Redirecting to old domain, tried everything, nothing works

I've moved a Wordpress site from one domain to another. I have changed the siteurl and home options in the wp-options table, added this tags into wp-login.php file: update_option('siteurl', 'http://...
0
votes
1answer
22 views

What should I use instead of get_blog_option?

I am using a plugin that was using get_blog_option and it no longer works. I looked up the call and it doesn't work because it's a wpmu function only. Is there an equivalent method that I can use ...
0
votes
1answer
37 views

Custom Role accessing the wp-option table

I'm using a plugin that create an additional record in the wp-option. Everything is great with the admin account, the record can be save and update. But I'm stuck with allowing one of the custom role ...
0
votes
1answer
47 views

How to find an option in the database?

As far as I can tell, the plugin that I'm using is saving options to the wp_options file: ### New global settings container, will eventually be the only one! $cformsSettings = get_option('...
0
votes
1answer
84 views

Comment Blacklist

I have a list of words that I placed in my blacklist_key option values update_option( 'blacklist_keys', $words);. But I still can make a comment with such words. Any ideas? I can't answer my question ...
2
votes
0answers
84 views

Cannot update my options using wp_ajax

I have implemented wp_ajax in on my options page but the value of my options are not getting saved or updated. Here is my form: public function email_settings_form(){ // Set class property $...
2
votes
0answers
465 views

Wordpress Deadlock Error

I see more of this error these days in error_log. I see that someone asked this question here a year ago but no solution. Please advise what is causing this issue. Already, tried deactivating some ...
1
vote
0answers
11 views

Why is MySQL receiving such a large serialized object?

I have gotten a 20GB error log that has an entry of repetitive serialized objects that look like this: a:2:{s:8:\"schedule\";b:0;s:4:\"args\";a:0:{}}}i:1440184624;a:1:{s:32:\"...
1
vote
0answers
39 views

update object options on option form

I have an object on an option called 'option_voc'. Now I would like to update only one field of this object through form i created on menu page i created (The plugin's settings page). I do not find ...
1
vote
0answers
50 views

Saving plugin options page

As I understood, default mechanism of saving options on plugin admin settings page (submitting form to options.php) allows to update only WordPress options (get_option, etc). But I have 2 values to ...
1
vote
0answers
51 views

Set $options reference

I am starting up in theme development and i have searched on codex on the topic of setting theme options.This is is what i am talking about, $options = array ( array( "name" => $themename." ...
0
votes
0answers
18 views

Override $table_prefix only for the options table

The only documentation i found was too obsolete. (https://wordpress.org/support/topic/two-sites-two-themes-one-database-same-content) and this one (Change options table prefix only) doesn't help me. ...
0
votes
0answers
45 views

PHP Fatal error: Cannot redeclare options_general_add_js()

Just updated to wordpress 4.5.2, I'm getting that error when loading the wp-admin/options-general.php page. Here is the stack trace mod_fcgid: stderr: PHP Fatal error: Cannot redeclare ...
0
votes
0answers
38 views

Why would wp_options.ibd be over 6GB

We run a WordPress 4.4.2 website using Mariadb per table indexing. The wp_options.ibd file is almost 7GB in size when there are less than 6K records in the table. Below is the my.cnf we are using, ...
0
votes
0answers
23 views

Website keeps redirecting to Wordpress install page (install.php)

I hope someone here can help me as the problem I have is driving me insane. For the last few months I have been putting together a Wordpress portfolio and had almost finished it. Recently, out of ...
0
votes
0answers
65 views

Saved option shows in page dropdown after page refresh

I'm adding a submenu page with a simple dropdown of pages as a settings, the code looks like this: <?php add_action('admin_menu', 'mytheme_admin_menus'); if(!function_exists('...
0
votes
0answers
48 views

Select fields on a settings page

I'm trying to do it in the style of 'Example #2' on this page: https://codex.wordpress.org/Creating_Options_Pages as it seems the tidiest way I have come across to do it. The problem is I want to ...
0
votes
0answers
79 views

siteurl value getting populated with junk in wp_options table

My website was getting this error on every page : Catchable fatal error: Object of class WP_Error could not be converted to string in /home/juhisheth/public_html/wp-includes/default-constants.php on ...
0
votes
0answers
102 views

What is the cron doing?

So I installed the P3 plugin to analyze the plugin load time at my site. It was OK at the actually analyzing but just a really poor plugin that basically crashed my server which has great specs over ...
0
votes
0answers
36 views

How to create a new database table whenever user changes options

I'am new to wordpress plugin development and I'am stuck in developing menu for my plugin. By going through documentation and many sites i created following menu. But i want to create a new table in ...
0
votes
0answers
276 views

WP_Query on “property” in the options table

I'm quite new to WP and I hope this question isn't seen as too specific. It's not entirely bound to my little "pre story". I'd really like an answer to this question for future cases as well. I get ...
0
votes
0answers
157 views

Add images functionality not working as wanted

I achieved this structure in wordpress admin panel. I am using wordpress option api to save and retrieve data from option.php . All I want to do is on every click of add more image button one more ...
0
votes
0answers
161 views

Share content between two different sites in same domain

I am trying to accomplish something weird... I have a client who wants to have two different sites to share the same content (some post types and pages). I warned him about SEO problems, but he still ...
0
votes
0answers
32 views

Trouble adding data to options table

I am trying to create a function that adds an option containing a subscription list to the options table. (This list is eventually referenced by a plug-in.) I am having some problems as there are two ...