The MU forums have moved to WordPress.org

mu-plugin not being recognized. At all. (8 posts)

  1. delayedinsanity
    Member
    Posted 14 years ago #

    Hi, I'm trying to debug an mu-plugin quirk, and I'm wondering if anybody here might have some tips for places to look.

    Long story short, I'm setting up a system that perked my interest in the wp-search-mu plugin (http://welcome.totheinter.net/wpsearchmu/). I downloaded and unpacked the archive to my mu-plugins folder, and Wordpress isn't seeing it AT ALL.

    I tried poking around in the plugin itself to see if the problem was there, but everything is good to go.

    I eventually discovered that Wordpress wasn't even seeing the file when I placed a die() inside of the plugin and Wordpress just kept tickin away. So I took the initial include from the plugin and placed it inside of another plugin I knew was working, and *poof* it started working.

    So for some reason I can't yet deduce, Wordpress is refusing to load the file. Has anybody encountered this before?

  2. dsader
    Member
    Posted 14 years ago #

    If you add directories/folders within the mu-plugins folder you also need to add a "include_my_plugin.php" in the mu-plugin folder to include the plugin file(s) within the plugin's folder.

    This is how it has always been for the mu-plugins folder - all php files are always active.

  3. delayedinsanity
    Member
    Posted 14 years ago #

    If that was all it was, then I'd smack myself around a little and swallow my foot. :)

    Here's my file structure;

    mu-plugins/wp-search-mu/*
    mu-plugins/wp-search-mu/wpSearch.php
    mu-plugins/index.php
    mu-plugins/my_functions.php
    mu-plugins/power-tools.php
    mu-plugins/wp-search-mu.php

    As you can see, there's very few mu plugins on this install, though a conflict could still exist somewhere in there.

    wp-search-mu.php is the file it won't read. This file is supposed to include wp-search-mu/wpSearch.php, but it isn't being read. I can put a die in there, anything, the file isn't being included by Wordpress at all. When I removed the include from wp-search-mu.php and placed it in my power-tools.php or my_functions.php file, the plugin activated.

  4. DeannaS
    Member
    Posted 14 years ago #

    It sounds like your file might be corrupt for some reason. Delete mu-plugins/wp-search-mu.php. Open a text editor, add the code to include the files (that worked when you added it to power-tools.php) and save it as wp_search_mu.php. Re-upload and see if it works.

  5. dsader
    Member
    Posted 14 years ago #

    File Permissions? Try 0644, or 0755

  6. delayedinsanity
    Member
    Posted 14 years ago #

    *slaps self around and eats foot*

    The file was being ignored because it was using php short tags, and I glossed right over that. And this is why I wait days if not weeks before I go to file a trac. ;) Whomever had the short tags idea when they were developing PHP needs to be retro-actively shot before it was implemented.

  7. andrea_r
    Moderator
    Posted 14 years ago #

    The plugin developer never read the "best practices" section on the codex for writing plugins. :) Last I checked, it said not to use short tags.

  8. delayedinsanity
    Member
    Posted 14 years ago #

    Let alone good practice for coding in general. Thank gawd for search and replace IDE's, I've had to deal with so many plugins and even themes that juggle between regular tags and short tags.

    Ah well. :)

About this Topic

  • Started 14 years ago by delayedinsanity
  • Latest reply from delayedinsanity