Thousands of wp-cron.php.* files in my root folder: how block WP generating them

My websites are hosted by BlueHost (shared hosting).

I've recently noticed that my root folder is flooded by thousands to wp-cron.php.* empty files (where * is a number starting from 1 to some thousands).

I suppose these files are generated by the wp-cron.php file and therefore by Wordpress.

How can I avoid generating them? Even though my hosting has unlimited space, they are useless and quite annoying.

  • Timothy Bowers

    Hey sciamannikoo.

    You could try by disabling all your plugins first and then seeing if the issue persists. If it stops then re-enable each one, one at a time until the problem starts again. This will let you know if it is a plugin issue.

    Maybe also try the default "Twenty Eleven" theme to make sure there is theme related issue with what you are currently using.

    Sounds to me though like it might be something like a wget/get running or a server config issue. Are all your file and folder permissions set correctly?

    Let me know how you get on with this so I can assist further. :slight_smile:

  • sciamannikoo

    Oh... I really didn't think this could be an actual issue.
    I thought it was a normal behavior the could have been simply disabled, instead you think this is caused by some plugin/theme?

    In this case the issue is more complicated: it is a production website and I can't simply disable all plugins/themes without causing more issues (without some custom written plugins the website can't even run).

    I prefer to keep the issue (is not such a big deal, as all these files are empty) than taking the website down.

    Thank you anyway Tim.

  • Timothy Bowers

    Hey sciamannikoo.

    Although you have "unlimited" hosting if your install is kicking out a ton of these files you may find your host taking action for excessive resource usage in shared hosting environments.

    Cheap "unlimited" hosts use this as a way to restrict unlimited, as there isn't such thing in reality. For high resource usage it is known for accounts to get suspended.

    This may or may not happen with your provider but I thought I would mention this as it could be an issue for you sooner or later. Fixing the issue could avoid that.

    Anyway, if you do continue to debug this then please let us know how you get on. :slight_smile:

    As you said you will leave it for now, I'll mark this one as resolved for now but please feel free to re-open it if you wish.

  • sciamannikoo

    Barry, the error log doesn't show anything related or connected to the wp-cron job.

    I've contacted the help desk (and this also answer Timothy very welcome concerns) to ask them if they can at least find with website is causing this issue.

    Because unfortunately these files are created in the root folder (/), not in the site's folder. I have different WP sites there and the fact that I can't even find which one is causing this issue, make things more complicated.

    I hope they will answer me.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.