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?

  • 2
    As @user51755 said, you need to define WP_CONTENT_URL too :) May 16, 2014 at 15:12

1 Answer 1


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' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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