WordPress Missing Visual (WYSIWYG) Editor

For quite some time now, I’ve had a missing visual (WYSIWYG) editor in WordPress. By missing, I mean the visual tab’s content was totally blank and no control buttons were being displayed.

I had just been ignoring it and adding all the content vial the text tab. Eventually it bugged me enough for me to attempt to track down the cause of the problem.

Searching Google found a lot of suggestions, none of which worked for me that I could find.

Turning off each plugin one at a time and testing the admin display after each deactivation revealed that the plugin causing the issue was Advanced Youtube Embed (also known as Embed Plus).

I tried uninstalling and reinstalling the plugin, but this didn’t help.

One strange thing I noticed was that this plugin was also installed on a different site, where the editor was functioning correctly. The comparison began. I deactivated all of the plugins on the failing site (excluding Advanced Youtube Embed) that weren’t in common with the working site but nothing changed.

Next I tried switching themes, but this also made no difference.

I then used Chrome’s console to view any errors that were occurring while the visual editor was loading. There were two internal server errors (500). One on each of the following pages:


Jumping into the source code, I didn’t have to look far to find line 2 of each page contained:
$installdir = explode(“wp-content”, __FILE__);

I then recalled that on the site where the visual editor was failing, I had changed the wp-content directory’s name to something else, and this was the only real difference between the working and non-working versions.

Changing these lines to reference my content folder’s name fixed the problem:
$installdir = explode(“other-directory-name”, __FILE__);

(no, my content directory’s name is not “other-directory-name”, this is just an example without having to use the actual director name).

It is likely that this problem will occur again with each upgrade of the plugin and will need to be manually changed until code authors cater to custom named wp-content directories by dynamically deriving the name / location using WP_CONTENT_DIR or equivalent.

Needless to say, this is a very specific problem and it’s not going to assist everyone having an AWOL visual editor in WordPress, but hopefully it might help someone out there facing the same problem.