Support » Plugin: PHP Native password hash » Must-use plugin

  • Resolved Marcus Downing

    (@marcusdowning)


    Is it possible to install this as a must-use plugin?

    Must Use Plugins

    My understanding is that MU plugins need to be a single file, or at least if they do have other assets those should be in an unambiguously named folder to avoid loading confusion.

    This plugin currently loads a second file, src/PasswordHash.php. It would be better if they could be rolled into one file, or failing that if the src folder was renamed to avoid ambiguity.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ayesh Karunaratne

    (@ayeshrajans)

    Hi @marcusdowning – Thanks for posting on the support forum.

    I have not thought about this plugin being used as an MU plugin, and as you said, the plugin core code resides in the src sub directory within the plugin code.

    My immediate observation is that this plugin, in theory, should work as an MU plugin. I’m still interested in keeping the plugin code separate in an src sub directory as it keeps the main plugin code minimal and helps add autoload features should WordPress eventually starts to use them.

    Can we try this?

    1. Download the plugin zip file off wordpress.org.
    2. Extract contents to wp-content/mu-plugins directory, so that there is a wp-content/mu-plugins/password-hash/wp-php-password-hash.php file.
    3. Create a new file at wp-content/mu-plugins/ named wp-php-password-hash.php (Full path: wp-content/mu-plugins/wp-php-password-hash.php).
    4. In the file created at #3, enter the following content:

    `
    <?php
    require __DIR__ .’/password-hash/wp-php-password-hash.php’;
    `

    This will hopefully make WordPress see the password-hash plugin, proxied from the file ew created at #3. See https://wordpress.org/support/article/must-use-plugins/#caveats

    I appreciate if you would post your results and observations with it. Thanks.

    Thread Starter Marcus Downing

    (@marcusdowning)

    Confirmed, that works.

    I didn’t add the require line, I just edited the existing require in wp_password_hash_include.

    Plugin Author Ayesh Karunaratne

    (@ayeshrajans)

    Awesome thank you @marcusdowning . I will update the FAQ list about MU information.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Must-use plugin’ is closed to new replies.