Title: Database table direct edit
Last modified: August 30, 2016

---

# Database table direct edit

 *  Resolved [kevinm21](https://wordpress.org/support/users/kevinm21/)
 * (@kevinm21)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/database-direct-change/)
 * Version: 1.5.1
    Hi – Thank you for your plug-in.
 * I need to update the data in wp_SH_CD_SHORTCODES table, rather than from Worpress
   Admin area.
 * While saving variables in WordPress everything works fine.
 * But if I revise the data in SQL wp_SH_CD_SHORTCODES table, the data change is
   not updated/reflected in the wordpress page.
 * I do see the change made in SQL table in **Shortcode Variables**, admin area.
   By re-Saving the newly updated data in Admin area, the change gets reflected 
   in the WordPress page.
 * Any way to fix this?
 * [https://wordpress.org/plugins/shortcode-variables/](https://wordpress.org/plugins/shortcode-variables/)

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

 *  Plugin Author [YeKen](https://wordpress.org/support/users/aliakro/)
 * (@aliakro)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/database-direct-change/#post-6754283)
 * Ah ok… to save hitting the database every time a shortcode is rendered, I cache
   the result.So, modifying the data directly is fine however the cache would need
   to be cleared for each shortcode i.e. that way it looks it up again from the 
   database.
 * There is actually no way to do this via the admin panel as I never intended for
   someone to update the database directly.So you have two options really:
 * 1) If you’re doing your changes via PHP you could always look at calling my function:
 * sh_cd_delete_cache($key)
 * 2) Reduce caching time for the plugin (not recommended) – at the moment the shortcode
   is cached upto an hour. You could reduce this to something like 5 minutes… you
   can change this in globals.php by editing the value of SH_CD_CACHING_TIME
 * Out of interest, why do you edit the table directly? I ask in case it’s a feature
   I could add to the plugin.
 * If you haven’t already, please review the plugin 🙂
 *  Thread Starter [kevinm21](https://wordpress.org/support/users/kevinm21/)
 * (@kevinm21)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/database-direct-change/#post-6754299)
 * Thank you for your prompt reply and information.
 * Since there are a lot of data, it does not make sense to input them one at a 
   time, so I use direct SQL update.
 *  Plugin Author [YeKen](https://wordpress.org/support/users/aliakro/)
 * (@aliakro)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/database-direct-change/#post-6754301)
 * Ah ok… would a CSV import tool be a useful feature?
 *  Thread Starter [kevinm21](https://wordpress.org/support/users/kevinm21/)
 * (@kevinm21)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/database-direct-change/#post-6754307)
 * Absolutely. Thank you.
 *  Plugin Author [YeKen](https://wordpress.org/support/users/aliakro/)
 * (@aliakro)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/database-direct-change/#post-6754308)
 * Maybe something for a future release 🙂

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

The topic ‘Database table direct edit’ is closed to new replies.

 * ![](https://ps.w.org/shortcode-variables/assets/icon-256x256.png?rev=2402961)
 * [Snippet Shortcodes](https://wordpress.org/plugins/shortcode-variables/)
 * [Support Threads](https://wordpress.org/support/plugin/shortcode-variables/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcode-variables/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcode-variables/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcode-variables/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [YeKen](https://wordpress.org/support/users/aliakro/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/database-direct-change/#post-6754308)
 * Status: resolved