WordPress.org

Ready to get started?Download WordPress

Forums

WP Smush.it
[resolved] must be within the content directory (5 posts)

  1. Josiah Sprague
    Member
    Posted 1 year ago #

    I am getting the error "must be within the content directory" on all of my images. The images are in the correct content directory, and the directory displayed in the error is correct as well. However, there is something preventing this from working. I suspect that it is this;

    My wordpress installation is in /wordpress/ but my wp-content folder is outside of the wordpress folder in /wp-content/.

    So the full path to the plugin is
    /wp-content/plugins/wp-smushit/

    And the full path to the uploads folder is
    /wp-content/uploads/

    I've redefined the location of my wp-content folder in wp-config.php, I have the correct site URL in the database, and everything else works fine, every other plugin, etc.

    I found a few old support requests about this error, but all of them seemed to say that the latest version fixes the problem. I've tried all of the workarounds I can find.

    Any ideas?

    http://wordpress.org/extend/plugins/wp-smushit/

  2. Josiah Sprague
    Member
    Posted 1 year ago #

    If I bypass "check that the file is within the WP_CONTENT_DIR" by commenting out that loop, I get "unknown error".

  3. Seth Alling
    Member
    Posted 1 year ago #

    Did you ever find a solution to this?

    I'm experiencing the same problem with my WP installation and content in directories outside each other.

  4. Josiah Sprague
    Member
    Posted 1 year ago #

    Nope, but Kraken.io has a WP plugin coming out that is going to blow smush.it out of the water. With the lack of support on this plugin, I think it's more likely that the Kraken plugin will be complete before this plugin gets fixed. If you're up for writing your own code to solve the problem, I'd recommend using Kraken as well, since their image optimization is even better than smushit.

  5. Seth Alling
    Member
    Posted 1 year ago #

    Sounds good. I'll look into it. Thanks for the quick reply.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.