Support » Plugin: PageSpeed Ninja » Don’t use .php files

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Denis Ryabov

    (@dryabov)

    There are three different ways to distribute optimized css and js files (see “Distribute method” in the Advanced tab):

    1. Direct. In this case your webserver is responsive for compression and sending expiration headers.
    2. Apache (there are two alternatives depending on installed Apache modules: mod_rewrite+mod_headers and mod_rewrite). Sending of precompressed files with expiration headers is made using special .htaccess file.
    3. PHP. Sending of precompressed files with expiration headers is made by PHP.

    You can use way #1 if others are not suitable.

    Thank you. I have found that option right after writing this support message.

    Still, I am facing another issue: If I’m using the first option for the parser, Standard HTML parser it does not parse anything,- or not always I can’t tell. Sometimes it does minify the HTML sometimes it doesn’t; it depends on the options I chose. But the JS/CSS merging doesn’t work at all only in Fast Simple HTML parser.

    Anyway, using Fast simple HTML parser works perfectly. With a single exception, the merged files for JS/CSS are 404-ing. And I can’t seem to find where these files are generated on disk for me to create a nginx redirect to them.

    Where are the merge files saved? Can you guys save them in a folder inside the uploads folder and link them from there?

    I am talking after the static files, which are linked to the location specified in the field which defaults to /s I guess.
    Here is an example: https://cdn.stage.hermandadblanca.org/s/d7baf4.js

    NOTE: My hosting is automatically rewriting all my URLs for static files to CDN. Still, I can’t find the actual files on disk.

    My hosting has the “root” folder inside wp-content/root/ which is sym-linked inside the docker container to the actual site root and all WP default files and folders like wp-admin and wp-includes are read-only. Maybe this will help you guys debug the issue further and make it compatible with all hosting environments especially the modern use of distributed systems like kubernetes and docker.

    BTW: We are going to use this plugin on multiple high-traffic sites with millions of page views monthly so we need it to perform very well and thus far it’s working wonderful in our tests. Keep up the good work guys! You did it very well and easy to use.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Don’t use .php files’ is closed to new replies.