'Directory Smush' not showing any directories

Hi, I am having an issue w/ the ‘Directory Smush’ feature… when I click it there are no directories listed to select from. I know that WP has access to the appropriate directories.

I do not want to use the dashboard plugin. I have added my api key via define in wp-config.

My main thought is that perhaps this issue is associated with the fact that I have installed WP in a subdirectory and moved/renamed wp-content, so that files look like this:

/wp
/resources (wp-content, renamed)
index
wp-config
htaccess

using defines

define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/resources' );
define( 'WP_CONTENT_URL', 'https://' . $_SERVER['HTTP_HOST'] . '/resources' );
define( 'WP_PLUGIN_DIR', dirname(__FILE__) . '/resources/plugins' );
define( 'WP_PLUGIN_URL', 'https://' . $_SERVER['HTTP_HOST'] . '/resources/plugins' );
define( 'PLUGINDIR', dirname(__FILE__) . '/resources/plugins' );
define( 'WPMU_PLUGIN_DIR', dirname(__FILE__) . '/resources/mu-plugins' );
define( 'WPMU_PLUGIN_URL', 'https://' . $_SERVER['HTTP_HOST'] . '/resources/mu-plugins' );
define( 'MUPLUGINDIR', dirname(__FILE__) . '/resources/mu-plugins' );

…so perhaps its just looking for “wp-content” in /wp/ and not seeing any directory at all?

(is it meant to be able to smush outside of wp-content? any directory WP has access to?)

Also, perhaps a thing: the primary site (blog id 1, site id 1) has had the value for SITEURL and HOME in wp_options altered so that no path is used, like this:

https://example.com/

even though WP is installed in /wp directory so that WP internal rewrite rules can make the /wp/ in the address bar *pretty* by removing it automatically… if something is trying to build a path using SITEURL…?

idk, thats what I can think of at the moment… any ideas?

Cheers, Max

  • Nahid
    • Ex Staff

    Hey Max ( wp.network ) !

    Hope you are having a great day!

    Is it meant to be able to Smush outside of wp-content? Any directory WP has access to?

    Smush has access to any custom created directories outside wp-content other than wp-admin and wp-includes. Here's a screenshot for reference:

    [attachments are only viewable by logged-in members]

    I tried to replicate the issue you are encountering and was able to do so. The issue occurs when the siteurl and home option values in the {prefix}_options table is altered like the way you did in case WordPress is stored in a sub-directory (e.g. /wp/ ).

    I've escalated the issue to the developers of the plugin for further clarification. They'll be back to us with the confirmation if it is a bug in the plugin, updates, workarounds and fixes (if possible). Please note that the response time of the Developers might be a bit higher than the General Support Staff. We really appreciate your patience and consideration regarding this. Thanks!

    Kind regards,

    Nahid

  • wp.network
    • The Bug Hunter

    Hi Nahid ( Nahid Ferdous Mohit ),

    Thanks for your rapid and effective response. This seems like a bug to me – looking forward to an update from devs.

    The issue occurs when the siteurl and home option values in the {prefix}_options table is altered like the way you did in case WordPress is stored in a sub-directory (e.g. /wp/ ).

    just wanted to note again: https://core.trac.wordpress.org/ticket/19796#comment:78

    Kind Regards, Max

  • Pawel Pela
    • Ex Staff

    Hello Adam !

    I’m very sorry to hear that you’re experiencing a similar issue!

    Please note that this ticket is almost 3 years old and speaking from experience, similar cases may have completely different causes :slight_smile:

    Because of this we prefer to handle cases in separate tickets so we don’t mix up two different issues :slight_smile: Please open a new ticket and describe the details of the issue you’re having. It’s okay to provide a link back here for additional reference.

    Once you start a ticket, our teammates will happily help you out with the issue you’re experiencing and will be able to provide you with custom support related only to your site.

    Kind regards,
    Pawel