Support » Plugin: Downloads Manager » Hardcoded file paths



    This is yet another plugin that is failing because it has filepaths hardcoded in the PHP code rather then correctly reading the paths from the wp-config file. It’s getting quite annoying by now since I’ve been trying to find a decent plugin for about an hour now!

    I have no “wp-content” folder, but just a “content” folder instead.
    I have no “plugins” folder within a “wp-content” or “content” folder, but just in the root.

    Why do developers insist on hardcoding these paths while these are all options that can be set in the wp-config file.

Viewing 2 replies - 1 through 2 (of 2 total)
  • nsathees


    how do you do that? I need to know!


    define( ‘WP_CONTENT_DIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/content’);
    define( ‘WP_CONTENT_URL’, ‘http://yoursite.url/content’);
    define( ‘WP_PLUGIN_DIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/plugins’);
    define( ‘WP_PLUGIN_URL’, ‘http://yoursite.url/plugins’);
    define( ‘PLUGINDIR’, ‘/plugins’); // support for older plugins

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hardcoded file paths’ is closed to new replies.