Title: Using WP database tables for plugin
Last modified: October 2, 2023

---

# Using WP database tables for plugin

 *  [miowebdesigns](https://wordpress.org/support/users/miowebdesigns/)
 * (@miowebdesigns)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/using-wp-database-tables-for-plugin/)
 * I am creating my own carousel plugin which I will use on sites that I create 
   for my clients. Yes there are many out there but mine does what I want it to 
   do. I could use others but it is a personal goal to create a proper WordPress
   plugin. Anyway, so I have my own database table to store the images and information
   but I want to use the WordPress tables. Is there documentation out there how 
   to accomplish this? What is the proper way to store and retrieve information 
   form these tables?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/using-wp-database-tables-for-plugin/#post-17094474)
 * In general use [class wpdb](https://developer.wordpress.org/reference/classes/wpdb/)
   methods using the global $wpdb object. Depending on what sort of table data you
   need, there could be WP helper functions that would be simpler than using $wpdb.
 * For image data, you could use the WP media library like we would for most other
   site images. Much data is saved by WP itself as an “attachment” post type when
   the image is uploaded. You can save any additional image data you need in the
   postmeta table. You could use [get_post_meta()](https://developer.wordpress.org/reference/functions/get_post_meta/)
   and its relatives to add, update, and delete.
 *  Thread Starter [miowebdesigns](https://wordpress.org/support/users/miowebdesigns/)
 * (@miowebdesigns)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/using-wp-database-tables-for-plugin/#post-17094816)
 * Thank you for the information. I will give it a look.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Using WP database tables for plugin’ is closed to new replies.

## Tags

 * [plugin](https://wordpress.org/support/topic-tag/plugin/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 2 participants
 * Last reply from: [miowebdesigns](https://wordpress.org/support/users/miowebdesigns/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/using-wp-database-tables-for-plugin/#post-17094816)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
