Many of us have a web log where we share with others our thoughts, experiences or ideas. One of those CMS that aids in blog editing is the ubiquitous WordPress. It has a market share of 59% within the Content Management Systems (CMS) market so it's not a surprise that 24% of all existent websites worldwide (no matter if it is an online newspaper, a corporate website or just a weblog) are powered by WordPress.
According to the Internet Live Stats it is expected that the total number of websites to exceed over 1 billion in the late of 2015 where the actual total number of Internet user is somewhere above 3 billion.
That is just impressive!
Obviously this means a lot of content (like text, images, videos) gathered around the WordPress, isn't it?
According to the 2014 report from the HTTP Archive the average size of a page has about 2MB. According to the WorldWideWebSize.com the Internet has over 4.7 billions web pages.
Now do the math: 24% of these 4.7 billions are powered by WordPress and each page has an average of 2MB => 2.4 PB (ie. 2,365,587 GB).
Do you backup your WordPress site? How?
I am wondering how many of these WordPress websites are backed up regularly, let alone how many people do test their backups. Do the WordPress has an internal backup/restore functionality and how it works? Are there any other alternatives?
The Solution - WP MyBackup
If you host your weblog at WordPress.com then your blog is automatically backed up regularly among with all other website hosted by that company. If you need a local copy of your weblog then WordPress provides an option to export your web content as an XML file that is downloaded on your local system.
Furthermore WordPress provides an option for importing that XML file too although depending on your web host the size of the file may be limited (like 15MB or below). You can however exceed these limits by talking with your hosting company or, in case you are the website administrator then you can follow this route.
So basically you end up with this file (which could be 100MB) that later you can re-import on the same place or somewhere else.
Basically these are the default options that WordPress comes with. No full backup (files like attachments, images, videos - the uploads - are not included) or scheduled backup, no compression at all, no storing the backup to cloud, no full restore. Nada. Niente. None.
WordPress is an ecosystem that has the minimal core functionalities built-in. On top of that it has a theme/plugin layer that allows one to install additionally any theme/plugin available out there which allow the customization of WordPress installation as needed.
WP MyBackup plugin allows one to create a full backup of its WordPress blog including:
- the WordPress core and admin dashboard files
- the blog uploaded data (like cache, images, videos, files)
- the WordPress plugins and themes
- the WordPress MySQL database which contains all your posts/comments and obviously your WordPress blog settings
The plugin allows you a fine-grained selection of what to include/exclude in your backups. For instance, you may include/exclude certain directories. You may even exclude files by extensions (eg. *.exe) or by name using an exclusion pattern (eg. uploads/videos*.avi). Nonetheless you may specify what MySQL table to include/exclude by using a regular expression pattern (eg. ^(ab|xy)+.*[0-9]$). Wp MyBackup allows you to run some MySQL maintenance (like database optimization/repair) before backing up your data. The resulted backup is a full SQL database script or if you prefer phpMyAdmin then it can create even an phpMyAdmin-like XML file.
So far WP MyBackup allows you to automatically store your backups to various targets like:
- your local web space
- to a FTP or FTPS via SSL server
- to a SFTP or SCP server
- to your Dropbox cloud storage
- to your Google cloud storage
- to a WebDAV server
- sent as an e-mail attachment
Regarding the FTP/SCP/WebDAV or e-mail targets you should know that WP MyBackup provides an extended set of advanced features for them like the transport library to use (which can be PHP built-in or the powerful cURL library), the mail back-end (like SMTP, sendmail or the built-in PHP mail function), email attachment size, SMTP connection parameters, etc.
WP MyBackup allows you even to schedule the date/time the backups are automatically created and also their recurrence (like daily, weekly, etc). This is a nice feature because you just set it once then never bother again. A worry-free backup - you might just like!
To help you optimize the space usage WP MyBackup allows you to choose the type of compression like (TAR, GZ, BZ2) and the compression level (10 different levels available where 0=none and 9=best). If for some reason your archive should have a fixed size (like 150MB) then you should know that WP MyBackup supports multi-volume archives. Whenever your backup ends (with success or failure) you will be notified by email which includes the full log of the backup job.
Now, being a developer for a while (like 20+ yrs) I know that there is no bug-free program. One reason for that is obviously the huge spectrum of environments that the end-users have/use and which cannot be tested in our limited testing environment. Let alone the interaction between our program with some other programs on the end-users environment which we never heard of. Nevertheless sometimes the problems that the end-users meet have nothing to do with the product itself (the product just happen to be a victim as well as many other programs in that environment).
To handle the potential situations described above WP MyBackup comes with a powerful logging mechanism that collects and to store different events together with their execution arguments and responses:
- when a job started and how (scheduled/interactively)
- the full job log including every single step and its result
- the debug messages (warning, notices, errors) received from the PHP engine
- the debug trace log (a backtrace of the error including source file and line code)
- the cURL debug log (the HTTP/FTP/SSL connection and transfer log)
- the SMTP debug log (some debugging info received from the SMTP backend)
- the action trace log (intercepts all clicks within the UI)
- mySQL debug (logs all the executed SQL statements and their results)
WP MyBackup also includes an option that allows you to check your PHP setup (is your environment ready for this plugin?). It will give you a complete table of system information including:
- the PHP, web server and OS version
- the OS total/free resources
- the installed PHP extensions and their version
- the installed/active WordPress plugins and their version
All this information gives the end-user (or the support team) enough debugging info to trace an issue and to find a solution.
The plugin is obviously free (like any other plugin hosted by WordPress.org), its source code was made public (under the terms of GPLv3) and can be downloaded/forked from plugins.svn.wordpress.org/wp-mybackup.
An enhanced version of this plugin is also available (WP MyBackup - PRO). The main difference between the free version and the PRO version is that the PRO version allows additional add-ons to be installed on top of those functionalities provided by the free version. There are over 20 different add-ons available as of September 2015. Below are few of the key features that may be used with the PRO Version:
- incremental and differential backup (besides the full backup - default)
- advanced backup Wizard
- backup CLI interface (it may be run in a terminal via CLI console)
- uploading throttling, advanced network settings (like proxy, SSL or timeout settings, etc)
- target file explorer (navigate the target directory with ease no matter if it's a FTP, Dropbox, Google or WebDAV server)
- backup any remote mySQL database (not only the one used by WordPress) or backup via mysqldump
- external compression toolchain support, compression benchmark support
- CPU throttling
- LZF and ZIP compression support
- OpenSSL and Mcrypt Rijndael encryption support for backups
- Enhanced job history and reporting
- restore Wizard
- schedule via OS (not only via the WordPress built-in scheduler)
Furthermore the PRO version allows you to get Premium Support.
You may also want to read these:
- WP MyBackup - the full feature list
- Comparison between the free version and the PRO version
- Comparison between WP MyBackup and other competitors
- Test MyBackup on SANDBOX
- Testing your backups. Why it matters
A non-WordPress implementation of this product is called simply MyBackup PRO and has also a free edition that was made public and can be downloaded/forked from its GitHub repository: https://github.com/eugenmihailescu/my-backup.
Now, if you think that this article was interesting don't forget to rate it. It shows me that you care and thus I will continue write about these things.
Latest posts by Eugen Mihailescu (see all)
- Gentoo AMD Ryzen stabilizator - April 29, 2018
- Symfony Compile Error Failed opening required Proxies - January 22, 2018
- Symfony authentication redirect after each request - January 22, 2018