• Resolved David Levine

    (@justlevine)


    Issue
    The option to optimize existing images is disabled when the internal WordPress cron job is disabled in lieu of a ‘real cron job’.

    As you know, the built-in wp-cron.php is extremely unreliable, and problematic. From the Knowledgebase:

    [T]his file may become target of a DOS attack, or caching plugins can interfere with its execution which can cause either a lot of server load or the scheduled tasks may not execute properly and timely. This is why, you can substitute this constant file execution with a real cron job.

    Current Behavior
    The plugin detects define('DISABLE_WP_CRON', true), and turns off the feature.

    Expected Behavior
    SG Optimizer should check to see if a manual cron job is set up as described in the above tutorial:
    wget -q -O - https://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

    Alternatively, if there isn’t a way for wordpress to detect manual cron-jobs, an option should exist ( in the plugin settings or defined in wp-config.php if you’re worried about less-technically apt users) to enable Existing Image Optimization regardless.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    Just fixed that in 5.0.6. Please, clear your browser cache completely, and we will give you an option to start the process anyway. I would love to get your feedback on how that works for you?

    Note, that if the cron is set on longer intervals, it may take longer for the task to complete.

    Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    Haven’t heard for some time so I guess that’s fixed and marking it as solved ??

    @hristo-sg

    When using a real cronjob do I need to leave the browser window open? This is what I see https://i.imgur.com/HoVXj96.png.

    Secondly, are you still requiring the cron to run only every 30 minutes on your shared hosting plans?

    Lastly, will the area here start to show some sort of a log of images when the cron runs?

    Thanks…

    Hi this does not work again on Version 5.0.13 https://ibb.co/3cbZd5S

    I have verified that my 373x37px ong images are bigger in size than the original 510x510px images that i uploaded. this is severely affecting my page size. If this isn;t fixed I will need to go back to using another image optimisation plugin which i am trying to avoid.

    • This reply was modified 5 years, 9 months ago by tman1987.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can’t optimize existing images when using the KB’s “real cron job”’ is closed to new replies.