Up

Kubik-Rubik Wordpress Backup Script

FREE Hot EOL 1.2 
Kubik-Rubik Wordpress Backup Script
wbs_v1.2.zip
Version:
1.2
License:
GPLv3
Author:
Viktor Vogel
Date:
02 February 2013
Downloads:
310

Kubik-Rubik Wordpress Backup Script

With this small script you can backup all files / (sub-)folders and the whole database of your Wordpress 3.x website within seconds into a zip archive. You can use this script to backup your website once or as often as you need (e.g. with the help of cronjobs). The default settings are optimized for a single backup creation. If you want to use this script for regular backups, then you should change some options in the settings of the script (directly in the script file).

This version was tested with PHP 5.3 / 5.4 and has German output notices!

Changelog

+ = Added - ! = Removed - ^ = Changed - # = Fixed

Version 1.0

+ First release of the script

Version 1.1

+ New Feature - Max. number of stored backup archive files at the same time
+ Optimized Zip Function - faster execution and correct path building if the script is called from a subfolder
+ Added ZipArchive class check

Version 1.2

# Wrong handling of \r\n in the database dump

Notes

How to change the settings for regular backups?

Open the script file with an editor (e.g. Notepad++) and adjust the settings:

  • $folder = '.' // Should not be changed.
  • $add_empty_folders = true; // Should not be changed, except you don't need empty folders in the backup.
  • $name_of_archive = false; // Should not be changed, except you need an indivdial name.
  • $target_directory = '.'; // Should be changed to a folder which is not used, e.g. 'backup'. You should protect this folder with a .htaccess file!
  • $overwrite_archive = true; // Should be changed to false to avoid loss of old backups. If you have limited webspace then leave true.
  • $exclude_files = false; // Should not be changed, except you want to exclude files you don't need in the backup.
  • $exclude_folders = false; // Should not be changed, except you want to exclude folders you don't need in the backup.
  • $delete_backup_script = true; // Should be changed to false, otherwise you have to upload the script for each backup process again.
  • $add_drop_statement = false; // Should not be changed, except you want to overwrite the database with same tables.
  • $additional_databases = false; // Should not be changed, except you have other databases which you need for your Wordpress website (e.g. a Piwik installation).
  • $token = false; // Should be changed to a long and secure token to protect the script.
  • $located_root = 0; // Should not be changed if you place the script in the root folder.
  • $backup_only_database = false; // Should not be change, except you want to backup only the database.

You should rename the script (wbs.php) and set a token to avoid calls from unauthorized!

Use at your own risk!

Don't waste your time when creating your daily backups in Wordpress