Support » Plugin: Count per Day » wp-content issue

  • Resolved Handoko


    For security reason (as suggested by Better WP Security plugin), I changed the default wp-content name.

    I can install this Count per Day but can’t activate it. It said:

    Warning: include_once(/home/mysite/public_html/wp-content/plugins/count-per-day/counter-core.php) [function.include-once]: failed to open stream: No such file or directory in /home/mysite/public_html/mycontent/plugins/count-per-day/counter.php on line 16

    I managed to make it work by manually creating a folder named ‘wp-content’ at the root directory and copying the count-per-day’s files (and its sub folders) to the folder.

    Now it’s working but I know it’s not the best thing to do. Hope the next release of this plugin fix this issue. I found this information, hope it helps:

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tom Braider


    Do you also changes the constant PLUGINDIR?
    Cpd is using this path ABSPATH.PLUGINDIR.’/count-per-day/’.



    I don’t know what is PLUGINDIR.

    I’m using Better WP Security and it suggested me to change default wp-content name. So I changed it using the a feature on Better WP Security.

    I changed it from wp-content to (for example) mycontent. So far, your Count per Day plugin is working correctly. I saw your plugin is installed under mycontent folder so I manually created a folder named wp-content/plugins/count-per-day and copy all your plugin files from my-content/plugins/count-per-day.

    Plugin Author Tom Braider


    PLUGINDIR is an constant of the path to the plugin dir.
    If you changed the content dir you have to change the plugin dir too.
    I think WordPress uses <content dir>/plugins by default. In this case my plugin should work. But maybe…
    add <?php var_dump(PLUGINDIR); ?> e.g. to the footer of you template an check the output. It should be the correct plugin dir e.g. .../mycontent/plugins.

    Oh, i see in you second link hints for the plugin dir.
    Perhaps PLUGINDIR is deprecated? Will change it in next version…
    Until that try this in you wp-config.php:
    define( 'PLUGINDIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content/plugins' );
    with you path…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp-content issue’ is closed to new replies.