Support » Plugin: Images to WebP » I can’t activate it

  • Resolved advertino

    (@advertino)


    I have similar problem

    Add the following to your .htaccess file in /var/www/vhosts/********.com/httpdocs/ above the line reading # BEGIN WordPress, then try activate Images to WebP again:
    
    # BEGIN Images to WebP
    <IfModule mod_mime.c>
    AddType image/webp .webp
    </IfModule>
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_ACCEPT} image/webp
    RewriteCond %{REQUEST_FILENAME} "/wp-content/"
    RewriteCond %{REQUEST_FILENAME} "\.(jpg|jpeg|gif|png)$"
    RewriteCond %{REQUEST_FILENAME}\.webp -f
    RewriteRule ^(.+)$ $1\.webp [NC,T=image/webp,E=webp,L]
    </IfModule>
    # END Images to WebP

    1. When I check the htasses, this entry is present in the file

    2. I can see this square – /wp-content/plugins/images-to-webp/tests/test.png

    3. OS: Ubuntu 20.04.2 LTS + Plesk Obsidian 18.0.37, last updated on Aug 2

    4. PHP 7.4.22 FPM application

    Capture

    5. Error GET /wp-admin/plugins.php?action=activate&plugin=images-to-webp%2Fimages-to-webp.php&plugin_status=all&paged=1&s&_wpnonce=d1b48d6cbb HTTP/1.0

    6.
    Restrict the ability to follow symbolic links – On
    NGINX Proxy mode – On
    Smart static files processing – On
    Serve static files directly by nginx – On
    Enable nginx caching – On
    Bypass cache when HTTP no-cache headers are received in request
    -//- HTTP authorization headers are received in request
    -//- GET nocache parameter is received in request

    7. Additional plugins
    Autoptimize
    Flying Scripts by WP Speed Matters
    Gutenberg Blocks and Template Library by Neve theme
    Perfmatters

    Is there enough information to suggest what the problem is? I don’t understand anything about this.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter advertino

    (@advertino)

    I found this description:
    The most common cause of this error is a plugin or a theme that is poorly coded and is failing to verify the nonce. To fix this issue, a user can turn off all plugins and activate them one by one to figure out which one of them is causing the error. … WordPress uses NONCE_SALT and NONCE_KEY to generate unique nonces.

    When I disabled all plugins and completely changed the theme, nothing changed. Plugin activation is not possible, despite the fact that the required lines are already in the htaccess.

    Thread Starter advertino

    (@advertino)

    2021-08-03 19:54:59 Error 203.150.154.62 GET /wp-admin/plugins.php?action=activate&plugin=images-to-webp%2Fimages-to-webp.php&plugin_status=all&paged=1&s&_wpnonce=d1b48d6cbb HTTP/1.0 Apache SSL/TLS access

    2021-08-03 19:54:59 Access 45.32.108.229 GET /wp-content/plugins/images-to-webp/tests/test.png?no_cache=1628020499 HTTP/2.0 nginx SSL/TLS access

    2021-08-03 19:55:01 Access 203.150.154.62 GET /wp-admin/plugins.php?plugin_status=all&paged=1&s HTTP/1.0 Apache SSL/TLS access

    Thread Starter advertino

    (@advertino)

    Capture

    This is the htassess of my website after trying to activate the plugin. As you can see, the required lines are in the file. However, when I click the “Activate” link, a warning appears again stating that these lines must be inserted into the file, and no activation occurs.

    Thread Starter advertino

    (@advertino)

    Ok, thanks @sterndata

    Thread Starter advertino

    (@advertino)

    After try connected by to NGINX

    1. Plucin activate notification^

    Add the following to your NGiNX config and restart it, then try activate Images to WebP again:
    
    map $http_accept $webp_suffix {
    	default "";
    	"~*webp" ".webp";
    }
    
    location ~* ^/wp-content/.+\.(png|gif|jpe?g)$ {
    	add_header Vary Accept;
    	try_files $uri$webp_suffix $uri =404;
    }

    2. Error log after click to Activate button
    GET /wp-admin/plugins.php?action=activate&plugin=images-to-webp%2Fimages-to-webp.php&plugin_status=all&paged=1&s&_wpnonce=edfe127153 HTTP/2.0

    Thread Starter advertino

    (@advertino)

    Without waiting for an answer, and also finding several posts with a similar problem that has never been resolved, in the end, I installed plugin EWWW Image Optimizer, which was installed the first time and works without any problems. Thanks for the support.

    Plugin Author kubiq

    (@kubiq)

    Hello,
    I don’t really understand what’s going on, because your first post is about .htaccess and last post is about NGINX…
    This plugin works on thousands of websites and hostings all over the world without any problem, but yes, there are some threads in this forum – mostly it’s problem on hosting, where WebP is not enabled/installed in GD or Imagick library, but it’s very individual, so that’s why I always write – please contact your hosting provider and ask him for help…
    I’m not allowed to ask users for credentials here, not even for testing environment and debugging these things partly blindfolded will take a lot of time and this is just free plugin without premium or PRO version
    I’m glad you found working solution! Best luck.

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