Title: Update Theme System
Last modified: August 19, 2016

---

# Update Theme System

 *  [antonshevchuk](https://wordpress.org/support/users/antonshevchuk/)
 * (@antonshevchuk)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/update-theme-system/)
 * Users who use my constructor theme have a trouble with update of it.
    It’s because
   automatic update is clears destination folder:
 *     ```
       // from upgrade method in Theme_Upgrader class
       $options = array(
       	'package' => $r['package'],
       	'destination' => WP_CONTENT_DIR . '/themes',
       	'clear_destination' => true, // !!!
       	'clear_working' => true,
       	'hook_extra' => array('theme' => $theme);
       ```
   
 * How I can avoid this error?

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

 *  [tmonkey](https://wordpress.org/support/users/tmonkey/)
 * (@tmonkey)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/update-theme-system/#post-1742736)
 * Is this a solution or a question? I’m having the problem with updating with a
   couple of sites… do child themes help with this?
 *  Thread Starter [antonshevchuk](https://wordpress.org/support/users/antonshevchuk/)
 * (@antonshevchuk)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/update-theme-system/#post-1742971)
 * It’s question…
 * I need solutions for avoid removal some folders in theme during automatic upgrade.
 *  [aLan "Lan" Tait](https://wordpress.org/support/users/vegenesist/)
 * (@vegenesist)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/update-theme-system/#post-1743191)
 * Anton,
 * The problem you describe is not an “error” as you suggest.
 * I am just starting to use your constructor theme. I am writing a plugin that 
   had a similar problem. Here is a solution to the update problem…
 * [Preventing WordPress Automatic Updates From Deleting Custom Settings (Themes and Plugins)](http://alantait.net/2011/01/09/preventing-wordpress-automatic-updates-from-deleting-custom-settings-themes-and-plugins/)
 * [http://alantait.net/2011/01/09/preventing-wordpress-automatic-updates-from-deleting-custom-settings-themes-and-plugins/](http://alantait.net/2011/01/09/preventing-wordpress-automatic-updates-from-deleting-custom-settings-themes-and-plugins/)
 *  [Frumph](https://wordpress.org/support/users/frumph/)
 * (@frumph)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/update-theme-system/#post-1743192)
 * use the function $arrayvar = wp_upload_dir() to get the correct paths to the 
   upload directories and put your content you do not want to get deleted from there
   instead of within the theme dir itself.
 *  [aLan "Lan" Tait](https://wordpress.org/support/users/vegenesist/)
 * (@vegenesist)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/update-theme-system/#post-1743195)
 * Thanks Frumph, this looks like a good solution for a few problems. Likewise [
   basedir] and [baseurl] in wp_upload_dir() look like a perfect replacement for
   custom. I will modify my code and the post to reflect this, Both in this Theme
   and in another theme and plugin I am working on.
 * Thanks again Frump – this was a real help!
 *  [Frumph](https://wordpress.org/support/users/frumph/)
 * (@frumph)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/update-theme-system/#post-1743196)
 * Yup yup, it even puts the correct paths in there if a person is on wpms and such.
 *  Thread Starter [antonshevchuk](https://wordpress.org/support/users/antonshevchuk/)
 * (@antonshevchuk)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/update-theme-system/#post-1743198)
 * Thank you for information!!!
    New version in progress……

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

The topic ‘Update Theme System’ is closed to new replies.

## Tags

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

 * 7 replies
 * 4 participants
 * Last reply from: [antonshevchuk](https://wordpress.org/support/users/antonshevchuk/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/update-theme-system/#post-1743198)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
