Hi, I had hosted my website on InfinityFree earlier the past year. Upon hosting, without any installations or anything, the website loaded incredibly fast as expected. But upon installing Wordpress and designing the website with Elementor, the website became very slow. The website takes around 40 seconds to open on a new device which is not acceptable. If only it is fully loaded once and loaded onto the cache, it becomes fast again. But after a few hours in which the site is unused, it becomes slow again. To try and eliminate the problem, I am using the WP Plugin W3 Total Cache. The speed after using Lazy Load, CDN and other options, has increased a bit. But like I said, the website still takes a full minute or even more to load. I need to fix this as soon as possible as I need to show my website to others who need to access it. Any help will be appreciated.
This is free hosting and that’s what you can expect (loading time). Sure, you can upgrade to premium if you can’t adjust with free hosting!
Elementor is not recommended for free hosting. You can add a cron job for every 5 minutes or so, so that your website refreshes every 5 minutes.
Also feel free to refer to this article.
WordPress is heavy software to begin with, and adding Elementor only makes it worse. Unless you have a VPS or dedicated server, your site is going to be quite slow unless you have a lot of visitors.
Setting up a corn job will certainly help though.
Thank you for replying. Can you please give me step-by-step instructions to make a cron job do exactly that i.e Refresh the site every 5 minutes or so?
Thank you too. Can you also please give me the instructions to set a cron job that does that?
To add a cron job:
- Log into cPanel
- Locate the “Advanced” section
- Click on “CRON jobs”
- Select the domain and click “Alter Crons”
You are now on the Setup page.
- Select “5” from the minutes select box
- Select “0” from the hours select box
index.phpin the “Script” box
- Click “Add Cron”
Now you have a cron job.
However, it may not run every 5 minutes, see this:
Thanks! I’ve just added the cron job as you said. But I’m a little confused about something. Running the index.php script every 5 minutes. Will refresh the website after every 5 minutes? Will this solve the issue of the site being slow?
This should load the website every 5 minutes. Because wp-cron.php will be completed already, the site should be significantly faster.
However, when I used Wordpress, I set up a cron job and the site was still abysmally slow.
Hi, I tested the website out for a few days after making a cron job and it seems to work sometimes. However, it is still very slow (sometimes). It seems that all the time it takes it to just get the website from the server. Once it does that, the page loads in a few seconds. Any more suggestions?
While having a cron job that loads your main page probably helps to alleviate some of the WP Cron stress, you can probably avoid it entirely by doing the following:
- In your
wp-config.phpfile, add the line
define('DISABLE_WP_CRON', true);. You can put it anywhere, at the end of the file is fine.
- Add a Cron Job that runs every five minutes and calls the URL
This should ensure that the background tasks are only executed by the cron job and never by a browser page load.
Important note: I’ve never actually tried this. It should work like this, but no guarantees.
Hi, so I added the other cron job alongside the first one and the website actually took a bit of time to load and even after it did, the media (images) in all the pages loaded very slowly which was never a problem before.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.