Smush Error posting to API: 500 Internal Server Error

Smush Error posting to API: 500 Internal Server Error

  • Adam Czajczyk

    Hello yziner,

    I hope you're well today and thank you for your question!

    The "500 Internal server error" can be caused by a number of reasons but in case of WordPress it's usually an insufficient memory issue. Let's please start with basics then :slight_smile:

    1.Make sure that the WPMU DEV Dashboard plugin is up and running in order to be able to use all the "Pro" features of the WP Smush Pro plugin (the plugin requires access to our API and this is active with the WPMU DEV Dahsboard plugin only)

    2. Add following line to the "wp-config.php" file of your site:


    The line should be placed above the "/* That's all, stop editing! */" line and will increase an amount of memory available for WordPress.

    3. Clear site's cache (if there's any caching implemented, e.g. W3 Total Cache plugin or similar) and give it another try.

    Let me know if that worked for you please.

    Best regards,

  • Dimitris

    Hey there yziner,

    hope you're doing really good today and don't mind chiming in! :slight_smile:

    I just went ahead and inspected your website a bit. When I was in Media -> Library (list view) to inspect the un-smushed images (you can see them as long as there's an action button in the latest column to smush it)

    I noticed that all of them (well, at least until page #15) is some kind of broken. Even though I can see them previewing, it seems to me to be rather corrupted jpeg files, and I wonder if they have any actual use in your website. Please do correct me if I'm wrong. :slight_smile:
    If not, could you please scan your media library and delete them if you don't need them anymore and test afterwards if there're more images that seem to be un-smushed?

    Either way, if you still getting error messages, please activate the WP_DEBUG, by editing wp-config.php of your installation, find a line like
    define('WP_DEBUG', false);
    and replace it with

    // Turn debugging on
    define('WP_DEBUG', true);
    // Tell WordPress to log everything to /wp-content/debug.log
    define('WP_DEBUG_LOG', true);
    // Turn off the display of error messages on your site
    define('WP_DEBUG_DISPLAY', false);
    // For good measure, you can also add the follow code, which will hide errors from being displayed on-screen
    @ini_set('display_errors', 0);

    If the above line doesn't exist, simply put the snippet before the /* That's all! Stop editing... */ comment. After doing so, bulk smush to reproduce the error, download the /wp-content/debug.log, rename it to debug.txt and attach it here in your next reply.
    You could also contact your hosting provider to get any other debug logs that may contain more info about this 500 error code.

    Warm regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.