WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have defined in my config:

define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/somedirectory' );

after Codex: Editing WP Config

BUT <?php echo get_template_directory_uri(); ?> prints out:


Even though it should print out


Has anyone else experienced this or know of a fix?

share|improve this question
As @user51755 said, you need to define WP_CONTENT_URL too :) – TheDeadMedic May 16 '14 at 15:12

This is how i set my content directory in wp-config.php

// ========================
// Custom Content Directory
// ========================
define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/somedir' );
define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/somedir' );
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.