• Hello,

    I have a problem with configuring the plugin which I cannot figure out.
    I try to use the plugin in CDN friendly mode (we use Cloudflare), and “Create webp files upon request?” Live test fails with error “Sanity check failed for WebP Express content dir: Directory does not exist or is outside restricted basedir”.
    We have a custom wp-content url defined in wp-config.php: define(“WP_CONTENT_URL”, “https://static.domain.com “), but WP_CONTENT_DIR is left as default (ABSPATH . ‘wp-content’).
    I think the error is related to the image URLs pointing to a different subdomain (static.domain.com instead of domain.com), and the plugin would only work if the URLs point to the main domain.
    I tried to add static.domain.com to the “CDN hostname(s) / hostname alias(es)” section, but still no luck.
    I can’t use the plugin now, because unconverted images become broken, because WebPRealizer.php fails to convert, but the references for webps are already there in the html.
    Is there a method to configure the plugin with custom WP_CONTENT_URL but default WP_CONTENT_DIR?
    Any help is appreciated!
    Thanks in advance!

    • This topic was modified 3 years, 6 months ago by molcsa.
  • The topic ‘Directory does not exist error with custom WP_CONTENT_URL’ is closed to new replies.