I’m having an issue on an old site. This happened at random, and did not follow an upgrae or edit. I’ve followed the steps outlined in previous questions, including :
- Renaming the plugins and adding them back in one by one to see if it fixes the issue.
- Uploading a new plugins.php file from WordPress’ current build
- Uploading a new settings.php file from WordPress’ current build
None of these things have fixed the issue…I only get more warnings. Any other ideas?
Make sure you’re core version of WordPress is 3.9.0 or greater as the function was added then: docs on wp_register_plugin_realpath()
If you’re on 3.9+, considering that modifying the plugins directory and core files had no impact there’s a good chance code in the theme could be messing you up. Try changing to one of the default themes (twenty-fourteen for example) and see if you get the error. Also enable debugging mode in wp-config.php to see if you can get any more info on the error with the following command:
define('WP_DEBUG', true);