Title: Define the Plugin Directory correctly
Last modified: August 22, 2016

---

# Define the Plugin Directory correctly

 *  Resolved [Sébastien Dumont](https://wordpress.org/support/users/sebd86/)
 * (@sebd86)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/define-the-plugin-directory-correctly/)
 * I found an error in the use of detecting the plugin directory and I thought this
   might be of use to those who have done the same as me.
 * I have customised how my WordPress files are located from the usual ‘wp-content’
   directory and I have also moved my plugins folder out of that by defining **WP_PLUGIN_DIR**
   in my wp-config.php file.
 * When setting up the plugin I was given an error that told me that certain files
   could not be read due to the location of where it was trying to load the files
   from.
 * So after a little reading into the code of this plugin I found that one line 
   needed to be changed.
 * Before:
    `define('WP_EMAIL_TEMPLATE_DIR', WP_CONTENT_DIR . '/plugins/' . WP_EMAIL_TEMPLATE_FOLDER);`
 * After:
    `define('WP_EMAIL_TEMPLATE_DIR', WP_PLUGIN_DIR . '/' . WP_EMAIL_TEMPLATE_FOLDER);`
 * After that, the plugin no longer displayed the error and the site was operational
   again.
 * Hope this helps anyone else who have had a similar issue.
 * [https://wordpress.org/plugins/wp-email-template/](https://wordpress.org/plugins/wp-email-template/)

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

 *  Plugin Author [Steve Truman](https://wordpress.org/support/users/a3rev/)
 * (@a3rev)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/define-the-plugin-directory-correctly/#post-5739949)
 * **Hello Sebastien**
 * Thank you for your post – support for that has been added in the latest version1.2.1
 * > * Tweak – Changed WP_CONTENT_DIR to WP_PLUGIN_DIR. When an admin sets a custom
   > WordPress file structure then it can get the correct path of plugin
 * Steve
 *  Thread Starter [Sébastien Dumont](https://wordpress.org/support/users/sebd86/)
 * (@sebd86)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/define-the-plugin-directory-correctly/#post-5739950)
 * That’s great to hear Steve. I’m glad I could help out.

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

The topic ‘Define the Plugin Directory correctly’ is closed to new replies.

 * ![](https://ps.w.org/wp-email-template/assets/icon.svg?rev=981250)
 * [WP Email Template](https://wordpress.org/plugins/wp-email-template/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-email-template/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-email-template/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-email-template/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-email-template/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Sébastien Dumont](https://wordpress.org/support/users/sebd86/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/define-the-plugin-directory-correctly/#post-5739950)
 * Status: resolved