Title: Database &#039;wp-options&#039; table
Last modified: August 20, 2016

---

# Database 'wp-options' table

 *  [Josh](https://wordpress.org/support/users/josh401/)
 * (@josh401)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/database-wp-options-table/)
 * Hi, I’m working on an option for my plugin which allows a user to import/export
   the settings from the plugin.
 * All settings are stored in the `wp-options` table; and they are all prefixed 
   with a unique set of characters.
 * I’m not very savvy with the database interface, but I have seen other plugins
   perform similar functions.
 * 1. Is it possible to isolate my plugin options stored in this table; since they
   are all prefixed with `jwl_`?
    2. Can I echo these values to a text box, or write
   to an xml (or similar) file, which can then be used to import the settings? 3.
   Could someone suggest the best place to start?
 * I know I’ll have to create a form to assist with the import/export. But what 
   is the best way to pull the values? Is `get_option` my only option?
 * Any other information will be most appreciated.

Viewing 1 replies (of 1 total)

 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/database-wp-options-table/#post-2716913)
 * You can get the options with a standard WP get_results:
 *     ```
       $options = $wpdb->get_results("SELECT * FROM $wpdb->options WHERE option_name LIKE 'jwl\_%'");
       ```
   
 * Note the backslash used to escape the underscore.
 * This returns an array of objects with the columns of the wp_options table. You
   should be able to echo these values as you wish.
 * EDIT: I ‘borrowed’ code from the [Users To CSV](http://wordpress.org/extend/plugins/users-to-csv/)
   plugin by Joost de Valk to create a plugin to export some data for one of my 
   sites.

Viewing 1 replies (of 1 total)

The topic ‘Database 'wp-options' table’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/database-wp-options-table/#post-2716913)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
