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
1answer
987 views

Wordpress Options Page not working

So, I need to add a custom options page, and based on as many tutorials I could find, I came up with the following code to create an officers & chairs options page for my group, mainly, so I can ...
0
votes
2answers
26 views

Change options table prefix only

I am not able to find, How can I change the only options table prefix. I do not want to change other tables prefix only need to change options prefix. Please guide me. Thanks
1
vote
4answers
645 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 ...
0
votes
1answer
428 views

WP Options Query “Rewrite Rules” Taking 10 Seconds After Testing wp_insert_post( )

Suddenly one of my test sites became absolutely unresponsive after testing with wp_insert_post( $my_post ) I Installed the black box plugin and checked what queries are slowing it down I found one ...
0
votes
0answers
22 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
30 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
1answer
26 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', ...
1
vote
1answer
702 views

Wordpress Plugin Dev: Using array for WP options

I am busy dabbling with writing a WP plugin and hitting a bit of a problem. I believe its best practice to store wp options to an array rather than individually which is great no probs. I have two ...
0
votes
1answer
40 views

Wordpress modify Settings > Permalinks (options-permalink.php) Add CPT Permalink Options

How do I modify the Settings > Permalinks (options-permalink.php) admin page to add more custom permalink parameters? I'd like to add additional permalink parameters to the "Optional" section for ...
0
votes
0answers
21 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
1answer
30 views

How to set wp_options in functions.php for removeing the Default Front Page

I want to disable the default front page as I want to show always the first listed page in the frontend. Therefor I disable the Static Front Page. But I have also to set in wp_options the variables ...
1
vote
1answer
40 views

Character Encoding for wp_options

I've been looking for a solution to my problem for a while now. Under my wp_options page I have the following serialized entry saved: ...
0
votes
1answer
22 views

WP Page Options Array

I'm creating a page options which contain some multiple checkboxes with specific values. Here is a snippet of my checkboxes form code: <label>Global Checkboxes</label> <input ...
0
votes
0answers
38 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'); ...
0
votes
0answers
74 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
1answer
21 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 ...
4
votes
5answers
14k views

Will it break my site if I delete all transient records in wp_options table?

My site currently has an outrageous 500k+ transient records in the wp_options table. This causes the table to be crashed frequently and so be my site. I thought transient records will all expired ...
0
votes
3answers
131 views

Same option_id=0 for 2 options in wp_options?

What does it mean when (according to mySQL Workbench) 2 options have option_id = 0? Just noticed this for unrelated plugin and theme holding very different options. Update Just noticed over 200 ...
0
votes
1answer
56 views

Save Image in wp_options-Table

I'd like to save one image in my custom settings page. i.e. this image should be the logo which should get print to the pdf files I generate. Thats why I want to store the image (the image link) in ...
1
vote
1answer
32 views

Is it possible to sort metabox teaxtarea values?

Textarea is on an options page, is it possible to sort the values within that textarea by alpha? I looked in the Codex but do not see any mention of sorting these values.
1
vote
4answers
110 views

Cleaning “cron” from options table, will affect anything?

I have some scheduled events in my WordPress site. For that I use a cron job, so it has created an option in the wp_options table. After some days, my site is getting slow. When I check my database, ...
0
votes
1answer
59 views

WP_OPTIONS table, active_plugins entry [closed]

I asked it here and found no response so far. Here is a sample entry from the active_plugins line of WP_OPTIONS table: ...
1
vote
1answer
63 views

Storing HTML in wp_options

I'm giving my users the option to store HTML in an option with a wp_editor(), using the wp settings api to handle the form. I currently do not apply any data sanatization to it, but realize I probably ...
0
votes
0answers
38 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
21 views

Counter variable resets before script is finished

I am working on a script for a client (a bookstore) that will upload their inventory to their WordPress database. They are using WooCommerce, and the upload file contains approximately 17,000 records. ...
0
votes
0answers
90 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
1answer
61 views

Store plugin page content in wp_options?

I want to write a plugin for wordpress that in some cases will show some content as if it were a post or page as an end result of a form processing. My idea is to add a hook that checks for and ...
0
votes
0answers
154 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 ...
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: ...
1
vote
0answers
73 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 ...
1
vote
0answers
37 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
399 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 ...
0
votes
1answer
193 views

Cannot unserialize Wordpress serialized values in `wp_options` table?

I have nav_menu_options in my Wordpress database as below. 284,'nav_menu_options','a:2:{i:0;b:0;s:8:\"auto_add\";a:0:{}}' I tried to deserialize this value but the result is empty string - I put a ...
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 ...
16
votes
2answers
3k views

Are all options loaded to memory on each request?

Are all options variables fetched from the database and loaded to cache on each request?
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
0answers
104 views

Store custom taxonomy option data in option table

Iam stuck in middle of thing that how could i store custom field data in option table of custom taxonomy. Actually i have a csv file and i want to save those data in custom taxonomy with the help of ...
1
vote
1answer
246 views

get_option() is not working even db contains the corresponding option_name and option_value

First of all, this is not a plugin specific problem. I wonder why this might happen? I am using @bainternet's Tax Meta Class for saving Taxonomy Meta using the options table. I uploaded my contents ...
4
votes
2answers
533 views

What is the advantage of the wp_options design pattern?

As we all know, a design pattern that is used frequently in Wordpress' DB code is the idea of persisting data for a particular object (blog/post/comment), indexed with a particular name or key. We ...
0
votes
2answers
1k views

update a value in wordpress wp_options

I am trying to modify a plugin and in which i require to update a value in wp_options which has multiple values . My option_name is ws_mem_options and the option_value has values such as in ...
0
votes
1answer
770 views

Save and user submitted data from a form and display them in the wp backend

My question is very simple but the answer I'm not sure if will be that simple. I'm developing a website for a non-profit organization where people can fill out a form containing questions usually ...
1
vote
1answer
87 views

Creating a one click demo importer

edit: I've re-written this because it is unclear, apologies it was written rushed on a Friday afternoon. Wordpress has import/export functionality for posts within wordpress, I am a theme developer ...
0
votes
2answers
285 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
1answer
138 views

shopping cart plugin development

I'm developing a new shopping cart plugin for WordPress. At a point, how to save orders, I am stuck, sort of confused. Actually I am not sure whether I should save order through options api or create ...
0
votes
1answer
110 views

Options table - where does my values go?

I just got my hand into wordpress and wp theme development. I know to create basic wordpress themes from scratch but I wondered how to get into custom theme options. My custom theme options (custom ...
0
votes
1answer
418 views

How do I add a value to a wp_options option that is an array?

What is the best way to add an option value to a registered option in wp_options that is an array? With phpmyadmin i see the option_value field is ...
1
vote
0answers
48 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 ...
0
votes
0answers
248 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 ...
3
votes
1answer
297 views

wp_options table value

I am trying to understand a wordpress behaviour. When I add a tag in the admin panel mysql does a sequence of queries. Essentially: update wp_terms update wp_term_taxonomy and udate wp_options with ...
1
vote
1answer
898 views

What is _transient_random_seed for?

This is a very short question. _transient_random_seed is in wp_options. What is it for?