Failed opening wp-load.php error after activating plugin
-
Recently installed this plugin. After activating it, I get the following errors:
Warning: include_once(/[DocumentRootPath]/wp-load.php) [function.include-once]: failed to open stream: No such file or directory in /[DocumentRootPath]/content/plugins/responsive-contact-form/ai-responsive-contact-form.php on line 68 Warning: include_once() [function.include]: Failed opening '/[DocumentRootPath]/wp-load.php' for inclusion (include_path='.:/usr/local/php-5.3.27/share/pear') in /[DocumentRootPath]/content/plugins/responsive-contact-form/ai-responsive-contact-form.php on line 68
Looking at line 68 in
ai-responsive-contact-form.php
, I’m noticing that it’s hardcoded toinclude_once($_SERVER['DOCUMENT_ROOT'].'/wp-load.php' );
. My WordPress files are stored in a subfolder of my document root while my content (plugins, themes, uploads, etc.) are stored in a content folder within my document root.I know next to nothing about writing plugins for WordPress, but I think you’re suppose to use
get_home_path()
to get the absolute path to the WordPress install folder? Changing$_SERVER['DOCUMENT_ROOT']
to that seemed to fix the issue for me.
- The topic ‘Failed opening wp-load.php error after activating plugin’ is closed to new replies.