Wordpress Bundle
  • What is Wordpress Bundle?
  • Getting started
    • Installation
    • Wordpress
    • Router
    • Cron job
    • Templates
  • Reference
    • Argument resolver
    • Controller
      • AdminAction
      • BlogController
      • FrontAction
      • WordpressAction
    • Entity
      • Block
      • Blog
      • Comment
      • File
      • Image
      • Menu
      • MenuItem
      • Post
      • Term
      • User
    • Repository
      • CommentRepository
      • PostRepository
      • TermRepository
      • UserRepository
    • Service
      • PaginationService
      • BreacrumbService
  • Guides
    • Server requirements
    • Install plugins
    • Use Multisite
    • Gutenberg
    • WP Steroids plugin
      • Image options
      • Maintenance
      • Admin pages removal
      • WYSIWYG Editor
      • Feature Support
      • Multi-site configuration
      • Constants definition
      • ACF configuration
      • Menu
      • Custom Post type
      • Advanced permalink settings
      • Custom Taxonomy
      • Templates
      • Page states
      • External table viewer
      • Roles
      • Optimisations
      • Security
      • Search
    • Twig Cookbook
    • Inject variables in all templates
    • Internationalization
    • Extending Wordpress Bundle
    • Error pages
    • Site health
  • Integrations
    • Advanced Custom Fields
      • Install ACF PRO
  • Extras
    • Migrating from 1.x to 2.0
    • Roadmap
    • Changelog
    • Alternatives
Powered by GitBook
On this page

Was this helpful?

  1. Getting started

Cron job

WordPress has something called wp-cron. If you haven’t read about it, its fine. But please be aware that you cannot live without it!

Wordpress run cron jobs when a user browse the website, for better performance, this behaviour is disabled.

Setup a real cronjob

From your Linux terminal, first open crontab:

crontab -e

Then add a line like below in it.

*/10 * * * * curl https://example.com/edition/wp-cron.php?doing_wp_cron > /dev/null 2>&1

or better

*/10 * * * * php /var/www/example.com/htdocs/public/edition/wp-cron.php?doing_wp_cron > /dev/null 2>&1

Please make sure you use correct path to wp-cron.php

Above will run wp-cron every 10 minutes. You can change */10 to */5 to make it run every 5 minute

PreviousRouterNextTemplates

Last updated 3 years ago

Was this helpful?