Setup wordpress cron jobs and debug methods

Setup wordpress cron jobs and debug methods

Why would you need to setup Wordpress cron jobs ? Cron jobs in Wordpress can be set for following reasons You have a custom post type for events and you wish to archive all your old events at regular intervals Archive logs e.g. if you have some plugin which tracks user activity then you may want to archive the logs table at regular intervals If you have integrated wordpress with some external application e.g. a mailing server then you need to synchronise your mailing lists with the external server Clearing caches for certain pages How to setup wordpress cron jobs wp_schedule_event is the function used to set up wordpress cron jobs Here's a sample code to set up a cron job [crayon-59c7eca511114499062575/] The above code will execute the function wpi_some_cron_job on daily basis. Some of the other options are hourly, twicedaily Now the question is where do we add the above code. The answer to this depends whether you want to set this up as part of your own...
Read More

Automatic Database backups using free Sypex Dumper tool

Automatic database backups can be set up very easily using a simple shell script and a cron job. However it may not be a practical solution for huge databases and the restoration process can also be difficult. There are various tools available to make this process simple. Sypex Dumper is just one of them. What is Sypex Dumper Sypex Dumper is a software product (PHP-script), which can help you create a backup copy (dump, export) of a MySQL database, and also restore the database from the backup file if needed. Read more and download With this tool huge databases can be backed up and restored with very high speed using least server resources and greatly reducing the size of the database dumps. Free version of the tool is enough to create the automatic backups. The Paid version allows to selectively restore a particular table from the entire database. Steps to set up automatic Database Backups Let's assume you want to create backup of your database every day and keep the...
Read More