Support » Fixing WordPress » Moving wp-content directory on 1and1 hosting

  • Hi,

    I’m having some difficulties getting the my plugins to work when i move the wp-content folder to it’s own directory. The directory structure I’m using is:

    wp-content (themes, plugins, uploads
    wp (contains wordpress install)

    I’ve defined the new local of the wp-content folder in the wp-config file as follows:
    define( ‘WP_CONTENT_DIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp-content’ );
    define( ‘WP_CONTENT_URL’, ‘’);
    define( ‘WP_PLUGIN_DIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp-content/plugins’ );
    define( ‘WP_PLUGIN_URL’, ‘’);
    define( ‘PLUGINDIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp-content/plugins’ );

    This all works fine on my local machine but when I move it to our 1and1 staging server the plugins stop working correctly. An example of this is on the yoast SEO plugin where it can no longer find it’s icon or javascript files needed to make it run correctly. The file path to the plugins is icon is showing as when it should be

    Any help would be much appreciated.



Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Steve,

    I have a very similar problem. Have you had any luck fixing it?

    Hi Kallsey,

    The 1and1 servers don’t seem to like the use of $_SERVER[‘DOCUMENT_ROOT’] so you need to put the directory path in your self. I used the following, which seemed to fix the problem. I presume that ‘homepages/44/d408549800’ is unique to each account so you will need to change that.

    define( ‘WP_CONTENT_DIR’, ‘/homepages/44/d408549800/htdocs/yourdirectory/wp-content’ );

    define( ‘WP_CONTENT_URL’, ‘/wp-content’);

    Hope that helps.



    You are a saint! That did it!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Moving wp-content directory on 1and1 hosting’ is closed to new replies.