While owning a wordpress site and having active content it’s mandetory to backup your site time to time to avoid any undesirable situation like hacking and malware issues where you need to restore your site back to normal. So if you have regular backups then even incase your database goes corrupt you can go back to the normal working state if you have the backups.
There are many plugins available to backup database or the files in wordpress but they also have there own over head on performance and security when you are on a shared hosting service with limited hardware resources.
Usually almost all backup plugin’s use wp-cron.php file to schedule the backups but when you care about your security and have enabled many security features on your site its observed that almost all backup plugin’s failed to do the job correctly on time and in a scheduled way.
For example BackupWordpress plugin throws below error and fails to backup
BackUpWordPress has detected a problem.
wp-cron.phpis returning a
403 Forbiddenresponse which could mean cron jobs aren't getting fired properly. BackUpWordPress relies on wp-cron to run scheduled backups. See the FAQ for more details.
So we came up with below easy simple script to backup wordpress which backups up both databases and the files in a easy way. Please follow below steps to setup and configure automatic wordpress backup for both database and files.
1. login to your hosting providers Cpanel or similar software.