[wp-trac] [WordPress Trac] #24143: When define('WP_CONTENT_DIR', 'your-dir') twentythirteen - The theme directory does not exist.

WordPress Trac noreply at wordpress.org
Mon Jul 1 06:46:20 UTC 2013


#24143: When define('WP_CONTENT_DIR', 'your-dir') twentythirteen - The theme
directory does not exist.
-------------------------------+------------------------------
 Reporter:  azizur             |       Owner:
     Type:  defect (bug)       |      Status:  reopened
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Themes             |     Version:  3.4
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+------------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:7 azizur]:
 > Did you meant to fix version to 3.6 ?

 No, version number indicates the earliest affected version. Customizer and
 WP_Theme were both introduced in 3.4. However, I could not reproduce the
 issue from comment:6 neither in 3.4 nor in current trunk.

 My steps (take 1):
 1. !WordPress installation is located at `/home/wordpress/trunk`, `wp-
 content` is one level above.
 2. In `wp-config.php`:
 {{{
 define('WP_CONTENT_DIR', '/home/wordpress/wp-content');
 define('WP_CONTENT_URL', 'http://wordpress/wp-content');
 }}}
 3. In a mu-plugin:
 {{{
 register_theme_directory('/home/wordpress/wp-content/themes');
 }}}
 4. Visit Themes screen, activate the theme.
 5. Visit Customizer. It works correctly.

 My steps (take 2):
 1. !WordPress installation is located at `/home/wordpress/releases/3.4`,
 `wp-content` is one level above.
 2. In `wp-config.php`:
 {{{
 define('WP_CONTENT_DIR', '/home/wordpress/releases/wp-content');
 define('WP_CONTENT_URL', 'http://releases.wordpress/wp-content');
 }}}
 3. In a mu-plugin:
 {{{
 register_theme_directory('/home/wordpress/releases/wp-content/themes');
 }}}
 4. Visit Themes screen, activate the theme.
 5. Visit Customizer. It works correctly.

 In your example from comment:6, you have:
 {{{
 define('WP_CONTENT_DIR', '/DocRoot/wp-content/'); // <- absolute path
 ...
 register_theme_directory('/DocRoot/wordpress/wp-content/themes'); // <-
 absolute path
 }}}
 Seems like you should use `/DocRoot/wp-content/themes` in your
 `register_theme_directory()` call.

 Also note that `WP_CONTENT_DIR` and `WP_CONTENT_URL` do not need a
 trailing slash.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24143#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list