# Error with manual install: Failed opening required '\_\_DIR\_\_/lib/discourse.php'

**URL:** <https://meta.discourse.org/t/error-with-manual-install-failed-opening-required---dir---lib-discourse-php/28788>\
**Category:** WordPress\
**Created:** [5월 13, 2015, 9:02오후 UTC](https://meta.discourse.org/t/error-with-manual-install-failed-opening-required---dir---lib-discourse-php/28788 "2015-05-13T21:02:02Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![mikegreenberg](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@mikegreenberg](https://meta.discourse.org/u/mikegreenberg)\
**Post date:** [5월 13, 2015, 9:02오후 UTC](https://meta.discourse.org/t/error-with-manual-install-failed-opening-required---dir---lib-discourse-php/28788/1 "2015-05-13T21:02:02Z")

</div>

I manually downloaded the latest master ZIP from the repo, dropped it into `public_html/blog/wp-content/plugins/wp-discourse/`, and clicked Activate. It produced the following error:

```
Warning: require_once( __DIR__ /lib/discourse.php) [function.require-once]: failed to open stream: No such file or directory in [REDACTED]public_html/blog/wp-content/plugins/wp-discourse/wp-discourse.php on line 30

Fatal error: require_once() [function.require]: Failed opening required ' __DIR__ /lib/discourse.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in [REDACTED]public_html/blog/wp-content/plugins/wp-discourse/wp-discourse.php on line 30

```

Not sure if this was designed to install this way, but the installation notes are sparse in this regard. The only way I was able to fix it was to replace ` __DIR__ ` with `WPDISCOURSE_PATH` in [wp-discourse/wp-discourse.php at main · discourse/wp-discourse · GitHub](https://github.com/discourse/wp-discourse/blob/master/wp-discourse.php#L30-L32).

Not sure where ` __DIR__ ` is initialized, but it wasn’t clear how to best fix this. Thoughts on my fix? Is this a bug?

---

_[View the full topic](https://meta.discourse.org/t/error-with-manual-install-failed-opening-required---dir---lib-discourse-php/28788)._
