• janw.oostendorp

    (@janwoostendorp)


    I run WordPress in a skeleton It’s also a subdomain multisite.
    The problem is I can’t get minify to work. I know where it goes wrong. But don’t know how to fix it.

    So example.com/content/plugins/w3-total-cache/pub/minify.php?file=H@sh.css gave a 500 error. I looked at w3tc-wp-loader.php and fixed the require.

    From:

    require_once '/domains/example.com/public_html/wp-load.php';

    to:

    // dynamic way to: /domains/example.com/public_html/wp/wp-load.php'
        require_once realpath(__DIR__ . '/../../wp/wp-load.php');

    And added define( 'DONOTVERIFY_WP_LOADER', true); to the wp-config.php

    So no more 500. Yay.

    But now I get 404 bad request.

    In the log I see:

    File “/domains/example.com/public_html/wp/wp/wp-includes/js/jquery/jquery-migrate.js” doesn’t exist

    That path is not correct. It should be:
    /domains/example.com/public_html/wp/wp-includes/js/jquery/jquery-migrate.js

    Digging in the code it seems the function w3_translate_file() (content/plugins/w3-total-cache/inc/define.php:1142) is where the url gets the extra /wp inserted.

    Is there anyway to fix this?

    https://wordpress.org/plugins/w3-total-cache/

  • The topic ‘Minify problem With WP in subfolder’ is closed to new replies.