• cjhaas

    (@chrisvendiadvertisingcom)


    We acquired a fairly large site with about 1,500 media items and we really wanted to prune those back and find all files that were actually being used. This plugin did exactly that!

    Installation and activation were easy, just clicks of a button. The plugin explicitly notes that only Apache is currently supported so for our Nginx sites we had to create a custom rule (which we’re used to with anything that needs to write to .htaccess). Here’s the Nginx rule that we used:

    location ~ /wp-content/(.*)\.(jpe?g|png|gif)$ {
        rewrite  ^(.*)$ /index.php?meow_media_handler=$1 last;
    }
    

    We know most of the content isn’t delivered via JS so we then just scanned the site with Xenu and found exactly what we needed to know!

    Very helpful and we’re looking forward to this possibly being merged into Media Cleaner.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Thank you so much for your nice review! Indeed, I want to make it work with Media Cleaner, but I would need beta testers for Media Usage first to have real live installs to test it. Interested? ??

    Also, thanks for sharing the Nginx rule, I should probably add this information in the plugin. In which file should users write this normally?

    In which file should users write this normally?

    Unlike Apache’s htaccess files, Nginx doesn’t parse any files by default without explicitly telling it to parse. W3TC creates its own file named nginx.conf at the root of the WP core files. Again, creating this file isn’t enough. The end-user still has to include it (if found) *and then restart* Nginx web server. This is the reason why Apache is still the default web server for many applications.

    In my opinion, please give the users the guidelines on what to do and tell them that it doesn’t work like Apache where most configurations can be applied dynamically via htaccess file.

    Thread Starter cjhaas

    (@chrisvendiadvertisingcom)

    Hi Jordy,

    I’d love to help with a beta, you can email me at chris at vendiadvertising dot com. I know a couple of other people that might be interested in it, too.

    Nginx has basically one server-wide config file that’s analogous to apache2.conf and as you can imagine the web process cannot write to this file. Some people (like me) also use the “sites-available” and “sites-enabled” pattern (like Apache) for individual sites while others just throw everything into the main config. For those that use the “sites” pattern, those config files are also not writable by the web process either and you’d have a hard time determining what is what anyway.

    As Pothi also said, there’s no .htaccess file that can be dynamically written to and read from and even if there were you’d still need to issue a reload or restart command to the nginx process which a web process wouldn’t (or at least shouldn’t) be able to do. The best you can really do it point people at a recommend test configuration which is what we do on our plugin:

    https://github.com/vendi-advertising/vendi-wordpress-caching/wiki/Nginx-Config

    Plugin Author Jordy Meow

    (@tigroumeow)

    Super, I’ll get in touch with you ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Very helpful!’ is closed to new replies.