• Resolved systemsph

    (@systemsph)


    I believe I have it all setup correctly. I can see that I have a bunch to optimize but the Bulk Optimize is not clickable.

    it’s a Bitnami LEMP install. I’ve tried by CLI too.

    sudo wp converter-for-media calculate
    How many images to convert are remaining on my website?
    Success: 1 765 for AVIF and 1 765 for WebP
    USER@SERVER:/opt/bitnami/nginx/conf/server_blocks$ sudo wp converter-for-media regenerate
    Bulk Optimization 100% [=======================================================================================] 0:00 / 0:00
    Success: The process was completed successfully. Your images have been converted!
    Successfully converted files: 0
    Failed or skipped file conversion attempts: 0
    USER@SERVER:/opt/bitnami/nginx/conf/server_blocks$

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

    (@mateuszgbiorczyk)

    Hi @systemsph,

    Thank you for your message.

    Do you have a red error message in the plugin settings panel at the top?

    Best,
    Mateusz

    Thread Starter systemsph

    (@systemsph)

    Yes, Error codes: rewrites_not_executed

    CONF:

    server {
        # Port to listen on, can also be set in IP:PORT format
        listen 443 ssl default_server;
        root /opt/bitnami/wordpress;
        # Catch-all server block
        # See: https://nginx.org/en/docs/http/server_names.html#miscellaneous_names
        server_name _;
        ssl_certificate      /opt/bitnami/nginx/conf/SITE.com.crt;
        ssl_certificate_key  /opt/bitnami/nginx/conf/SITE.com.key;
        # BEGIN Fix for WordPress plugins and themes
        # Certain WordPress plugins and themes do not properly link to PHP files because of symbolic links
        # https://github.com/bitnami/bitnami-docker-wordpress-nginx/issues/43
        rewrite ^/bitnami/wordpress(/.*) $1 last;
        # END Fix for WordPress plugins and themes
        # BEGIN WordPress
        # https://ww.wp.xz.cn/support/article/nginx/#general-wordpress-rules
        location = /favicon.ico {
            log_not_found off;
            access_log off;
        }
        location = /robots.txt {
            allow all;
            log_not_found off;
            access_log off;
    }
    #### WEBP
    
    # BEGIN Converter for Media
    set $ext_avif ".avif";
    if ($http_accept !~* "image/avif") {
        set $ext_avif "";
    }
    
    set $ext_webp ".webp";
    if ($http_accept !~* "image/webp") {
        set $ext_webp "";
    }
    
    location ~ /wp-content/(?<path>.+)\.(?<ext>jpe?g|png|gif|webp)$ {
        add_header Vary Accept;
        expires 365d;
        try_files
            /wp-content/uploads-webpc/$path.$ext$ext_avif
            /wp-content/uploads-webpc/$path.$ext$ext_webp
            $uri =404;
    }
    # END Converter for Media
    
    #### END WEBP
    
      location / {
            try_files $uri $uri/ /index.php?$args;
        }
    
        location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
            expires max;
            log_not_found off;
        }
        # END WordPress
        include  "/opt/bitnami/nginx/conf/bitnami/*.conf";
    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @systemsph Have you read step 4 in the Configuration for Nginx question in the plugin FAQ?

    Please change this part:

        location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
            expires max;
            log_not_found off;
        }

    on this:

        location ~* \.(js|css|ico)$ {
            expires max;
            log_not_found off;
        }
    Thread Starter systemsph

    (@systemsph)

    Did that.

    Fixed it by, selecting “Pass Thru (without rewrites in .htaccess files or the Nginx configuration)”

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @systemsph This is not an optimal solution. Please try again with the Nginx configuration – it must work.

    I once prepared a video showing the configuration of the Nginx server (it is a pure Nginx server installed on Linux): https://www.youtube.com/watch?v=2er6He-Pl_U

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Bulk Optimize is not clickable?’ is closed to new replies.