I added the lines define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content' ); and define( 'WP_CONTENT_URL', 'example/blog/wp-content';); in my wp-config.php and then my site broke. Even some of the widgets on the backend do not appear anymore. I immediately removed the above lines from the wp-config.php however that did not change anything.


  • What is your URL?
    – s_ha_dum
    Commented Dec 4, 2012 at 18:29
  • I don't know if it's just a typo but you have a syntax error in your above define for the WP_CONTENT_URL it should be: define( 'WP_CONTENT_URL', 'example/blog/wp-content'); Commented Dec 4, 2012 at 18:33
  • A good approach is also to always to backup your configuration files. Commented Dec 4, 2012 at 18:34
  • I had added only above 2 lines. I removed them immediately. However, the site is still down and even many of the widgets have disappeared. How can that happen?
    – user544079
    Commented Dec 4, 2012 at 18:36
  • Most specifically i was using the widgetkit for wordpress. All the places where that was used have disappeared
    – user544079
    Commented Dec 4, 2012 at 18:36

1 Answer 1


There're some things you should not play around with, until you really know core inside out and one of those things are the Path constants that can be set in your wp-config.php.

Here's how I do it. Note, that it's uncommented, so it doesn't trigger and WP uses its default.

# define( 'WP_CONTENT_DIR_NAME',    'wp-content' );

There're dozens of things you shouldn't touch in there, but Path constants and the Proxy settings are those that can get broken most easily. WP uses for nearly everything a default and you should simply let it do its job. Aside from having nothing from a dir name change (maybe security through obscurity) it will let a lot of plugins break that don't consider those things.

  • I can see all my plugins on the backend wp-content/plugins folder. But somehow the path got changed and even after deleting those define('WP_CONTENT_DIR','') and define('WP_CONTENT_URL','') lines. My site still cannot pick up those plugins :( Maybe it got cached? My wp-config.php is now the same as how it was before i made any change. How can I get my plugins to get detected?
    – user544079
    Commented Dec 4, 2012 at 23:57
  • 1
    @user544079 - your problem has deeper roots. I think you should address that... Have you followed the documentation?
    – brasofilo
    Commented Dec 5, 2012 at 0:16
  • Turn off all plugins, switch to the default theme. See if it still happens.
    – kaiser
    Commented Dec 5, 2012 at 3:35
  • Now my site has gone all blank and I just get a white page. I tried to turn on error reporting by including error_reporting(E_ALL); // OR error_reporting(-1); // OR ini_set('error_reporting', E_ALL); inside wp-config.php as i do not have access to php.ini. How can I fix the white screen?
    – user544079
    Commented Dec 5, 2012 at 15:24
  • The white screen means, that you got no error reporting. Turn on everything, as I show in this Gist. And I guess you're developing on a remote server... oh, my... Don't do this. Test stuff in local, then go to stage and finally to production. That's what MAMP/XAMPP and such are for. Btw: You can still access the DB? Then revert (via PhpMyAdmin) to no active plugins and the Twenty* theme.
    – kaiser
    Commented Dec 5, 2012 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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