Support » Plugin: WebP Converter for Media » Requires a wp-content folder to exist

  • Resolved mickaelperrin



    I had troubles to get your plugin working with our custom installation of wordpress.

    After digging around, I found that the wp-content folder is hardcoded in the UploadsWebpcDirectory class and it requires to exist to have the uploads folder selectable in the settings panel.

    Note, that this happen even by using the custom filter.

    Also, I would point to your attention that you use ABSPATH as default folder, but you should maybe have a look at WP_CONTENT_DIR which defaults to ABSPATH . ‘/wp-content’ in standard wordpress installation and allows you to get rid of the wp-content folder.

    We use that setting in conjunction of WP_CONTENT_URL to provide a custom cookie free no php domain to deliver all plugins/themes/uploads static assets (js, css, medias…).

    Our custom directory structure is:

    |—- app/. <- directory root of our https://media.domain.TLD
    . |
    . |- languages/
    . |- plugins/
    . |- themes/
    . |- uploads/
    . |- webp/ <- output folder of webp converted files
    |—- www/ <- directory root of out https://domain.TLD with wordpress core only

    To get your plugin working I needed to create an empty /src/app/wp-content/uploads.

    Hope it helps,

Viewing 1 replies (of 1 total)
  • Plugin Author Mateusz Gbiorczyk


    Hello @mickaelperrin,

    Thanks for your message.

    Can you edit this file?

    Add a method inside this class:

    	 * Returns status if directory is available.
    	 * @return bool Directory is available?
    	public function is_available(): bool {
    		return true;

    Does this fix the problem without creating an empty directory?


Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.