HTTP 403 Error with wp-cron.php on WordPress

Website URL

(https://tienda-gatopersa.rf.gd/)

Error Message

Unexpected HTTP response code: 403

Other Information

I’m setting up an online store using the free hosting from Infinity Free. I’ve had a couple of issues with the payment gateway, but I managed to resolve it by avoiding woopayments and using PayPal instead. Now, I’ve encountered another issue related to cron tasks.

I’m experiencing a recurring problem with my WordPress site hosted on InfinityFree. I’ve noticed that scheduled cron events are not running as they should, and when trying to diagnose the issue, I’ve come across an HTTP 403 error every time WordPress tries to access wp-cron.php.

I’ve performed various checks and steps to troubleshoot the problem, including checking security plugins and examining the .htaccess file for rules that might be blocking access to wp-cron.php, but nothing unusual has been found. This means that the WP-Cron events on my site might not be functioning. The issue was: “Unexpected HTTP response code: 403”

Explanation Text: This means there’s an access control restriction like BasicAuth, a firewall, a security or privacy plugin, some form of password protection, or a .htaccess rule preventing access to your wp-cron.php server.

This suggests there might be an access control restriction imposed at the server level or through a firewall.

Could you provide any guidance on how to resolve this issue? Is there any specific server configuration I should check or change to allow access to wp-cron.php? Or is there a security policy that is preventing the execution of wp-cron.php that can be adjusted for my site?

My site is just a draft to get familiar with WooCommerce and payments. If there are specific settings for setting up stores/e-commerce on infinityfree, I would like you to share the manual or the steps.

Also, if you need more information, I can share it in screenshots.

Any help or additional information you could provide would be greatly appreciated.

Thanks in advance for your time and assistance.

Best regards,
Jorge Garcia

Cron tasks are no longer available on free hosting after they were found to be overloading servers and slowing down a bunch of websites a few months ago.

WordPress should be able to run Cron tasks when you get visitors

6 Likes

Clarifications on WooCommerce Functioning Without Cron Jobs on Free Hosting

Hello Greenreader9,

Thank you for your previous response. I understand that scheduled cron jobs have been disabled in the free hosting plan, and that WordPress should execute cron jobs when it receives visitors. However, I have some additional questions to ensure that my WooCommerce store operates optimally under these conditions:

1. Payment Processing:
• Despite the cron job restrictions, can I be sure that payment processing through PayPal will not be affected? Is there any WooCommerce functionality related to PayPal that depends on cron jobs that I should be aware of?

2. Order Status Updates:
• How does WooCommerce handle automatic order status updates without active cron jobs? Is additional configuration or monitoring required to ensure that order statuses are updated after each transaction?

3. Notifications and Emails:
• Will automatic notifications and emails to customers and administrators be sent correctly without scheduled cron jobs, or should I manually handle email sending? Are there recommended steps to check or ensure that these are sent?

4. Database Maintenance:
• With tasks like cleaning up expired sessions and abandoned carts that might not run, are there recommended practices I should follow to keep my database optimized?

5. Use of External Cron Services:
• Would you recommend setting up an external cron service to ensure these tasks are executed? If so, are there any security or performance implications that I should be aware of?

6. Hosting Alternatives:
• Finally, is there an upgrade option within InfinityFree that would allow me to use scheduled cron jobs, or should I consider migrating to a paid hosting to ensure full functionality of my WooCommerce store?

I would greatly appreciate your comments and suggestions on these issues so I can continue operating my online store with confidence.

Thanks again for your time and help.

Best regards,
Jorge Garcia

Can you please rewrite that without AI? I don’t want to have to read and understand all that, just to answer the wrong question because ChatGPT chaged what you actually wanted to ask.

AI has its uses, but not with support requests. It just makes it 10 times more difficult for the people helping you.

6 Likes

No. You can read more on the thread that announced the cron job shutdown, but in short, trying to replicate the functionality won’t work and is also forbidden:

As WooCommerce is a heavy script, considering a premium option if free hosting does not suit your needs is a good idea. InfinityFree offers a paid hosting option through partner iFastNet, which can migrate your site from the free to the paid platform; you can read more here (the article is written from the point of view of someone who has already migrated their site, but can help someone considering to as well):

5 Likes

Sure, I’ll be brief. Would I have any kind of problem on my website if the wp-cron tasks are not being performed? Will purchases still be reflected on my site? What kind of problems could my site have due to wp-cron tasks so I can be aware of them?

Hi Jorge_Garcia,

From a technical standpoint, free hosting prevents automated access to the site, which means payment notifications webhooks will not work as you expect, instead, you have to manually refresh the order statuses with the gateway of your choice, which might not offer manual refreshing options to begin with. Using an external cron job also wouldn’t work due to the same security system in place.

Cron jobs are not provided on free hosting as previously the feature is found to be used on many invalid operations and consumes a lot of server resources. Many people are not familiar with cron jobs and aren’t properly configuring them causing the resource burn, it is not necessarily due to absue. The feature is then terminated some time ago.

Without wp-cron your site would still work just fine with the exception of automated operations never works. You have to manually update the core, plugins and order statuses by yourself.

Alternatively, you can trigger wp-cron by visiting your site periodically, but there is no garentee that all plugins of your choice would take that opportunity to run their tasks due to performance considerations.

From a hosting perspective, it is fair to have cron on premium plans as programmers like me will also often use those to monitor certain changes and perform automated tasks like sending email or gerenating reports, which consumes certain amount of resources that aren’t going to be finanically-justified for proving on free tier.

From a business perspective, generating revenue using free resource is lucrative but not always viable, you still have to spend time and resources on building a success money generator. Trying to use workarounds against paid options actually costs you more as your labour time is the most expensive cost.

Simply put, there must be a cost to run a business and cutting on hosting isn’t a wise choice if eCommerce is the context.

Cheers!

5 Likes

I don’t believe you need any cron jobs to use PayPal in the first place. The entire payment flow is user triggered I think, no need to run any periodic tasks in the background to process a payment.

Anything that’s triggered by a human will work. So if the customer places the order, or completes the payment, that will trigger interaction on your site, which can correctly update the order status and send notifications. Same if you change the order status, for example because the order has been shipped.

None of these things seem like a particularly good fit for a cron job anyways, because you generally want notifications and status updates to be processed when the change occurs, not once in a while.

Standard WordPress Cron should take care of this.

No, this is expressly forbidden. Also, it probably won’t work.

Premium hosting has cron job functionality. On InfinityFree, it has specifically been removed, so we’re not going to offer a workaround to have it anyways.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.