Support » Fixing WordPress » Site migration "Invalid plugin path"

  • Resolved iangeek

    (@iangeek)


    OK, I’ve worked with WP for years, shifted countless sites from one server to another, but this one is driving me crazy…

    Site has been moved verbatim from one host to the staging server of another, siteURL etc updated to the preview address for the new host – all standard practice so far.

    The plugins are all listed on the Plugins page in the admin area, but all inactive. When I go to activate any, it gives me an “Invalid plugin path” error.

    I’ve tried removing the old plugins folder, adding a new one, and installing a new plugin at random from the “Add New” menu, which installs quite happily. Yet again, when trying to activate it I get the “Invalid plugin path” error.

    I’ve also tried repairing the DB, and also swapping the htaccess for a clean new one. Still the same error.

    I even tried hacking wp-admin/includes/plugin.php where the error check is called so it showed me the absolute path… which definitely exists.

    Anyone? This is driving me batty! :-/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m not going to pretend I’ve seen this error before, but have you tried turning on debugging? Perhaps there’s an error earlier on in the process that could shed some light on what’s happening.

    Sadly debugging revealed nothing… The script that returns the error is a really simple “file exists? Yes/No” check and part of the core:

    if ( validate_file($plugin) )
      return new WP_Error('plugin_invalid', __('Invalid plugin path.'));

    So there’s no debug info to be returned in this instance. I created my own debug info by mod-ing the code myself to return the absolute path it was searching for, but that still didn’t reveal anything.

    I got onto my web host’s tech team (http://www.layershift.com/, who are pretty switched on support-wise) to see if they could spot anything obvious. Which they couldn’t, and were just as baffled…

    …But…

    All of a sudden, without either me or the host’s tech team having made any change to anything, it suddenly started working. Literally nothing had been altered, and the problem had persisted for ages. But then all sorted itself out without any hint of a problem. Really odd.

    All we could put it down to was possibly some sort of crazy NGINX voodoo, but even then they didn’t seem that convinced.

    Oh well, just marking it down as one of those annoying, time-wasting WordPress quirks. Thanks for the input though Marios!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Site migration "Invalid plugin path"’ is closed to new replies.