admin管理员组文章数量:1325359
Recently I bought a small package of VPS to start working on a website. To make server configuration stuff easy, I installed VestaCP. I have installed WordPress on the server, then the necessary theme and plugins.
A plugin of the website needs to fire scheduled/cron work on every 5 minutes. The problem is the scheduled jobs from the plugin are not running, though the site on a cPanel based VPS is working.
I want to know what configuration needs to update in my VPS to make the server run scheduled work from the WordPress plugins?
Recently I bought a small package of VPS to start working on a website. To make server configuration stuff easy, I installed VestaCP. I have installed WordPress on the server, then the necessary theme and plugins.
A plugin of the website needs to fire scheduled/cron work on every 5 minutes. The problem is the scheduled jobs from the plugin are not running, though the site on a cPanel based VPS is working.
I want to know what configuration needs to update in my VPS to make the server run scheduled work from the WordPress plugins?
Share Improve this question asked Aug 30, 2020 at 10:36 Shah AlomShah Alom 4981 gold badge5 silver badges14 bronze badges1 Answer
Reset to default 1I'd guess this is because your new website isn't getting any traffic.
By default WordPress doesn't have any background processes to run scheduled jobs on, and instead runs them when it next gets a web request after the scheduled start time. Hence it needs a constant stream of web traffic to run scheduled jobs on time. See Cron in the WordPress documentation.
To fix this, you can set up a scheduled job using the VPN's system cron to trigger WordPress's cron jobs. Again from the WordPress documentation: Hooking WP-Cron Into the System Task Scheduler, e.g. cron configuration
*/5 0 * * * wget --delete-after http://YOUR_SITE_URL/wp-cron.php
If you have many long-running jobs there are also plugins that will run WordPress scheduled tasks in a separate service for you.
本文标签: Cron jobs not working in WordPress plugin in a VPS with VestCP control panel
版权声明:本文标题:Cron jobs not working in WordPress plugin in a VPS with VestCP control panel 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742148009a2422880.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论