The default WordPress cron can be a bit of a resource hog. The script itself is useful; among others it checks if there are WordPress updates and if there are any scheduled posts that should be published. However, the wp-cron.php script runs on every page load. That is waste of resources, and it can slow down your website.
You can easily replace the WordPress cron with a real cron job. If you have access to WordPress Toolkit then you can simply toggle Take over wp-cron.php to on.
Image: replacing the default WordPress cron.
The Take over wp-cron.php option does two things. Firstly, it disables the default WordPress cron by adding this rule to your website’s wp-config.php file:
define ('DISABLE_WP_CRON', true);
Secondly, it adds a proper cron job that runs twice an hour. The exact times at which the cron job runs is picked randomly. In my case the cron job runs at 12 and 42 minutes past the hour:
12,42 * * * * cd /home/example/public_html && /usr/local/bin/php /home/example/public_html/wp-cron.php
You can at any time enable the default WordPress cron again via Toolkit. If you want you can also change how often the cron job runs via cPanel’s cron jobs page.
As shown above, replacing the default WordPress cron with a proper cron is a two-step process: you need to disable the default cron by adding a rule to the wp-config.php file and then set up a “proper” cron job. The article about cron jobs in cPanel walks you through how to do that step-by-step.
This article is part of a series about things you can do to optimise your WordPress website and make it more secure. The other articles cover the following topics:
By catalyst2 Team
Businesses are continually searching for new ways to streamline their operations and optimise their application deployment processes. Kubernetes, a powerful container orchestration platform, has become the go-to solution for managing containerised applications. Its ability to automate deployment, scaling and management of applications makes it ideal for any business currently running applications on multiple virtual machines …
By catalyst2 Team
When reviewing website performance and the success of digital marketing campaigns, there are several important metrics that business owners will compare. One of these metrics is the ‘bounce rate’ and a high bounce rate can be an indication that something isn’t working. Understanding what’s causing visitors to bounce off your website is key to making …
By catalyst2 Team
Different times of the year present different challenges for retailers and e-commerce businesses. The lead-up to the holiday season is known for being busy and Black Friday, in particular, is a monumental day where shopping activity reaches a peak. With more businesses now offering Black Friday deals online for a few days or even a …
By catalyst2 Team
When trying to reach a wider audience, having a good online presence is crucial. A website can help to increase brand awareness and get more people talking about your products or services. The importance of a website extends beyond brand visibility though, it will become a platform for customer engagement and business transactions. However, simply …
By catalyst2 Team
More so than ever before, a website is a necessity. No matter whether you run a small, independent business or a multinational brand, having a good online presence can have a direct impact on exposure, sales and success. Your website is your digital storefront and it’s a way for you to reach more people, regardless …
By catalyst2 Team
You can create a breathtaking website that provides an abundance of useful information to your customers, however, if it’s slow loading, then it might not be successful. Having a fast and efficient website is essential in today’s busy world, and customers expect to be able to access the information they need quickly and easily. If …
By catalyst2 Team
Having a good online presence is crucial for businesses of all sizes. A high-performing website not only acts as a virtual storefront but also provides a powerful tool for marketing and revenue generation. Although there are costs associated with website development, maintenance and online marketing campaigns, your return on investment (ROI) can be significant if …
By catalyst2 Team
Without a server, your website wouldn’t be visible on the internet. A server provides the infrastructure and resources you need to deliver your website pages to visitors, and it’s key to ensure you’re choosing the right server for your needs. From Virtual Private Servers and cloud servers to dedicated servers, there is a wide range …
By catalyst2 Team
In today’s digitally driven world, a website is a key marketing tool for start-up businesses. As you venture into new and exciting markets, a well-designed website is crucial for helping you to establish an online presence and engage with potential customers. It acts as a platform to showcase your products, services and USPs. Not to …
By catalyst2 Team
More so than ever before, people are reliant on the internet to find the products or services they need. So, server downtime can have a significant impact on businesses of all sizes. It is particularly detrimental to e-commerce businesses and those who operate solely online, and the importance of finding a reliable hosting solution can’t …
We really rate catalyst2. We get a great response from the team… really happy with the service.
Cookie | Duration | Description |
---|---|---|
bcookie | 2 years | LinkedIn sets this cookie from LinkedIn share buttons and ad tags to recognize browser ID. |
bscookie | 2 years | LinkedIn sets this cookie to store performed actions on the website. |
lang | session | LinkedIn sets this cookie to remember a user's language setting. |
lidc | 1 day | LinkedIn sets the lidc cookie to facilitate data center selection. |
UserMatchHistory | 1 month | LinkedIn sets this cookie for LinkedIn Ads ID syncing. |
Cookie | Duration | Description |
---|---|---|
_ga | 2 years | The _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognize unique visitors. |
_gat_gtag_UA_5562310_11 | 1 minute | Set by Google to distinguish users. |
_gid | 1 day | Installed by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously. |
CONSENT | 2 years | YouTube sets this cookie via embedded youtube-videos and registers anonymous statistical data. |
Cookie | Duration | Description |
---|---|---|
_fbp | 3 months | This cookie is set by Facebook to display advertisements when either on Facebook or on a digital platform powered by Facebook advertising, after visiting the website. |
fr | 3 months | Facebook sets this cookie to show relevant advertisements to users by tracking user behaviour across the web, on sites that have Facebook pixel or Facebook social plugin. |
IDE | 1 year 24 days | Google DoubleClick IDE cookies are used to store information about how the user uses the website to present them with relevant ads and according to the user profile. |
test_cookie | 15 minutes | The test_cookie is set by doubleclick.net and is used to determine if the user's browser supports cookies. |
VISITOR_INFO1_LIVE | 5 months 27 days | A cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface. |
YSC | session | YSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages. |
yt-remote-connected-devices | never | YouTube sets this cookie to store the video preferences of the user using embedded YouTube video. |
yt-remote-device-id | never | YouTube sets this cookie to store the video preferences of the user using embedded YouTube video. |
Cookie | Duration | Description |
---|---|---|
_ashkii | session | No description available. |
_wicasa | 3 months | No description available. |
AnalyticsSyncHistory | 1 month | No description |
cookid | 3 months | No description available. |
cookietest | session | No description |
crisp-client/domain-detect/1644827320973 | session | No description |
crisp-client/domain-detect/1644827348275 | session | No description |
crisp-client/domain-detect/1644827428415 | session | No description |
crisp-client/domain-detect/1644827479357 | session | No description |
crisp-client/domain-detect/1644827596454 | session | No description |
crisp-client/domain-detect/1644827724838 | session | No description |
crisp-client/domain-detect/1644827824383 | session | No description |
crisp-client/domain-detect/1644827878659 | session | No description |
crisp-client/domain-detect/1644828716243 | session | No description |
crisp-client/domain-detect/1644828846246 | session | No description |
crisp-client/domain-detect/1644829369013 | session | No description |
crisp-clientsession30cc6953-ebcf-4bc6-b649-c44eb446409e | 6 months | No description |
dbmFP | 3 months | No description available. |
dbmPK | 3 months | No description available. |
li_gc | 2 years | No description |