• The plugin already contains binaries, but they do not execute, because this feature is disabled for the public_html folder on all hosting services.

    1. Therefore, we will create a folder outside of public_html. For example ‘/home1/user7/webp’. You must change this path to yours.

    2. Copy binaries here. We can take them from the plugin folder or from here.
    We have to get the path ‘/home1/user7/webp/cwebp’

    3. Change the file ‘/home1/user7/webp/cwebp’ permision to Chmod 744 (chmod a+rwx,g-wx,o-wx)

    4. We have to add this path in the plugin file BinaryDiscovery.php

    // Common system paths
        private static $commonSystemPaths = [
            '/usr/bin',
            '/usr/local/bin',
            '/usr/gnu/bin',
            '/usr/syno/bin',
            '/bin',
            '/home1/user7/webp',
        ];

    5. All. Now you have a working conversion method cwebp.

    A request to the author, if you can add a field where you can specify this path in the settings, so as not to edit the plugin file.

    Tested on shared hosting Bluehost and Hostgator with PHP v7.3

The topic ‘Make the plugin work on shared hosting’ is closed to new replies.